- Timestamp:
- 08/12/10 11:57:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r4200 r4203 316 316 DeregisterRunEvents(e.Items); 317 317 foreach (IRun item in e.Items) { 318 foreach (ListViewItem listViewItem in GetListViewItemsForItem(item)) {319 RemoveListViewItem(listViewItem);320 break;321 }318 //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection 319 ListViewItem listviewItem = GetListViewItemsForItem(item).FirstOrDefault(); 320 if (listviewItem != null) 321 RemoveListViewItem(listviewItem); 322 322 } 323 323 analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0; … … 332 332 DeregisterRunEvents(e.OldItems); 333 333 foreach (IRun item in e.OldItems) { 334 foreach (ListViewItem listViewItem in GetListViewItemsForItem(item)) {335 RemoveListViewItem(listViewItem);336 break;337 }334 //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection 335 ListViewItem listviewItem = GetListViewItemsForItem(item).FirstOrDefault(); 336 if (listviewItem != null) 337 RemoveListViewItem(listviewItem); 338 338 } 339 339 RegisterRunEvents(e.Items);
Note: See TracChangeset
for help on using the changeset viewer.