Changeset 3632 for trunk/sources/HeuristicLab.Optimization
- Timestamp:
- 05/05/10 14:04:53 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
r3625 r3632 84 84 OnColumnNamesChanged(); 85 85 OnRowNamesChanged(); 86 this.UpdateFiltering(false); 86 87 } 87 88 protected override void OnItemsRemoved(IEnumerable<IRun> items) { … … 160 161 public override IDeepCloneable Clone(Cloner cloner) { 161 162 RunCollection clone = (RunCollection)base.Clone(cloner); 162 clone.resultNames = this.resultNames;163 clone.parameterNames = this.parameterNames;163 clone.resultNames = new List<string>(this.resultNames); 164 clone.parameterNames = new List<string>(this.parameterNames); 164 165 clone.dataTypes = new Dictionary<string, HashSet<Type>>(); 165 166 foreach (string s in this.dataTypes.Keys) 166 167 clone.dataTypes[s] = new HashSet<Type>(this.dataTypes[s]); 167 168 168 return clone; 169 169 } … … 252 252 253 253 #region filtering 254 private void UpdateFiltering() { 255 list.ForEach(r => r.Visible = true); 254 private void UpdateFiltering(bool reset) { 255 if (reset) 256 list.ForEach(r => r.Visible = true); 256 257 foreach (IRunCollectionConstraint constraint in this.constraints) 257 258 constraint.Check(); … … 278 279 DeregisterConstraintEvents(e.OldItems); 279 280 RegisterConstraintEvents(e.Items); 280 this.UpdateFiltering( );281 this.UpdateFiltering(true); 281 282 } 282 283 protected virtual void Constraints_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRunCollectionConstraint> e) { … … 284 285 foreach (IRunCollectionConstraint constraint in e.Items) 285 286 constraint.ConstrainedValue = this; 286 this.UpdateFiltering( );287 this.UpdateFiltering(false); 287 288 } 288 289 protected virtual void Constraints_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRunCollectionConstraint> e) { 289 290 DeregisterConstraintEvents(e.Items); 290 this.UpdateFiltering( );291 this.UpdateFiltering(true); 291 292 } 292 293 protected virtual void Constraint_ActiveChanged(object sender, EventArgs e) { 293 this.UpdateFiltering(); 294 IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender; 295 this.UpdateFiltering(!constraint.Active); 294 296 } 295 297 protected virtual void Constraint_ConstrainedValueChanged(object sender, EventArgs e) { … … 297 299 } 298 300 protected virtual void Constraint_ConstraintOperationChanged(object sender, EventArgs e) { 299 this.UpdateFiltering(); 301 IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender; 302 if (constraint.Active) 303 this.UpdateFiltering(true); 300 304 } 301 305 protected virtual void Constraint_ConstraintDataChanged(object sender, EventArgs e) { 302 this.UpdateFiltering(); 306 IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender; 307 if (constraint.Active) 308 this.UpdateFiltering(true); 303 309 } 304 310 #endregion -
trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs
r3617 r3632 70 70 constraintColumn = value; 71 71 this.OnConstraintColumnChanged(); 72 this.OnToStringChanged(); 72 73 } 73 74 } -
trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs
r3617 r3632 60 60 constraintColumn = value; 61 61 this.OnConstraintColumnChanged(); 62 this.OnToStringChanged(); 62 63 } 63 64 }
Note: See TracChangeset
for help on using the changeset viewer.