- Timestamp:
- 02/05/09 11:08:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/sources/HeuristicLab.Data/ConstrainedItemList.cs
r347 r1204 114 114 public bool TryInsert(int index, IItem item, out ICollection<IConstraint> violatedConstraints) { 115 115 list.Insert(index, item); 116 if ( !suspendConstraintCheck &&IsValid(out violatedConstraints)) {116 if (suspendConstraintCheck || IsValid(out violatedConstraints)) { 117 117 OnItemAdded(item, index); 118 118 return true; … … 127 127 IItem item = list[index]; 128 128 list.RemoveAt(index); 129 if ( !suspendConstraintCheck &&IsValid(out violatedConstraints)) {129 if (suspendConstraintCheck || IsValid(out violatedConstraints)) { 130 130 OnItemRemoved(item, index); 131 131 return true; … … 144 144 IItem backup = this[index]; 145 145 list[index] = item; 146 if ( !suspendConstraintCheck &&IsValid(out violatedConstraints)) {146 if (suspendConstraintCheck || IsValid(out violatedConstraints)) { 147 147 return true; 148 148 } else { … … 155 155 public bool TryAdd(IItem item, out ICollection<IConstraint> violatedConstraints) { 156 156 list.Add(item); 157 if ( !suspendConstraintCheck &&IsValid(out violatedConstraints)) {157 if (suspendConstraintCheck || IsValid(out violatedConstraints)) { 158 158 OnItemAdded(item, list.Count - 1); 159 159 return true;
Note: See TracChangeset
for help on using the changeset viewer.