Changeset 4447
- Timestamp:
- 09/20/10 10:41:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs
r4435 r4447 178 178 179 179 int i = 0; 180 T[] items = itemListViewItemTable.Keys.ToArray(); 180 var query = from item in itemListViewItemTable.Keys 181 let views = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v.Content == item) 182 where !views.Any(v => v.Locked) 183 select item; 184 T[] items = query.ToArray(); 185 181 186 foreach (T item in items) { 182 187 try { … … 187 192 } 188 193 catch (Exception) { } 194 finally { 195 SetEnabledStateOfContentViews(item, true); 196 } 189 197 } 190 198 OnAllItemsSaved(); … … 196 204 else { 197 205 progressBar.Value += progress; 198 SetEnabledStateOfContentViews(item, true);199 206 } 200 207 } … … 314 321 } 315 322 private void saveButton_Click(object sender, EventArgs e) { 323 var query = (from item in itemListViewItemTable.Keys 324 let views = MainFormManager.MainForm.Views.OfType<IContentView>().Where(v => v.Content == item) 325 where views.Any(v => v.Locked) 326 select item.ToString()).ToArray(); 327 if (query.Length != 0) { 328 string itemNames = string.Join(Environment.NewLine, query); 329 MessageBox.Show("Could not save the following items, because they are locked (e.g. used in a running algorithm). All other items will be saved." + Environment.NewLine + itemNames); 330 } 316 331 Save(); 317 332 }
Note: See TracChangeset
for help on using the changeset viewer.