Changeset 3798 for trunk/sources
- Timestamp:
- 05/13/10 17:31:13 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3/Collections
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs
r3628 r3798 127 127 protected override void OnCollectionReset(IEnumerable<T> items, IEnumerable<T> oldItems) { 128 128 foreach (var oldItem in oldItems) 129 checkedState.Remove(oldItem); 129 if (!list.Contains(oldItem)) 130 checkedState.Remove(oldItem); 130 131 foreach (var item in items) 131 132 if (!checkedState.ContainsKey(item)) … … 151 152 protected override void OnItemsRemoved(IEnumerable<T> items) { 152 153 foreach (var item in items) { 153 checkedState.Remove(item); 154 if (!list.Contains(item)) 155 checkedState.Remove(item); 154 156 } 155 157 base.OnItemsRemoved(items); -
trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs
r3628 r3798 163 163 protected override void OnCollectionReset(IEnumerable<IndexedItem<T>> items, IEnumerable<IndexedItem<T>> oldItems) { 164 164 foreach (var oldIndexedItem in oldItems) { 165 checkedState.Remove(oldIndexedItem.Value); 165 if (!list.Contains(oldIndexedItem.Value)) 166 checkedState.Remove(oldIndexedItem.Value); 166 167 } 167 168 foreach (var indexedItem in items) { … … 189 190 protected override void OnItemsRemoved(IEnumerable<IndexedItem<T>> items) { 190 191 foreach (var indexedItem in items) 191 checkedState.Remove(indexedItem.Value); 192 if (!list.Contains(indexedItem.Value)) 193 checkedState.Remove(indexedItem.Value); 192 194 base.OnItemsRemoved(items); 193 195 } … … 200 202 protected override void OnItemsReplaced(IEnumerable<IndexedItem<T>> items, IEnumerable<IndexedItem<T>> oldItems) { 201 203 foreach (var oldIndexedItem in oldItems) 202 checkedState.Remove(oldIndexedItem.Value); 204 if (!list.Contains(oldIndexedItem.Value)) 205 checkedState.Remove(oldIndexedItem.Value); 203 206 foreach (var indexedItem in items) 204 207 if (!checkedState.ContainsKey(indexedItem.Value))
Note: See TracChangeset
for help on using the changeset viewer.