Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/16/15 21:39:15 (8 years ago)
Author:
abeham
Message:

#2441: merged r13181, r13198 to stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.Optimization/3.3/RunCollection.cs

    r12725 r13199  
    483483    #region Filtering
    484484    private void UpdateFiltering(bool reset) {
    485       var oldUpateRuns = UpdateOfRunsInProgress;
    486       UpdateOfRunsInProgress = true;
    487485      if (reset)
    488486        list.ForEach(r => r.Visible = true);
    489487      foreach (IRunCollectionConstraint constraint in this.constraints)
    490488        constraint.Check();
    491       UpdateOfRunsInProgress = oldUpateRuns;
    492489    }
    493490
     
    539536    protected virtual void Constraint_ConstraintOperationChanged(object sender, EventArgs e) {
    540537      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
    541       if (constraint.Active)
    542         this.UpdateFiltering(true);
     538      if (constraint.Active) {
     539        var oldUpdateRuns = UpdateOfRunsInProgress;
     540        try {
     541          UpdateOfRunsInProgress = true;
     542          UpdateFiltering(true);
     543        } finally { UpdateOfRunsInProgress = oldUpdateRuns; }
     544      }
    543545    }
    544546    protected virtual void Constraint_ConstraintDataChanged(object sender, EventArgs e) {
    545547      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
    546       if (constraint.Active)
    547         this.UpdateFiltering(true);
     548      if (constraint.Active) {
     549        var oldUpdateRuns = UpdateOfRunsInProgress;
     550        try {
     551          UpdateOfRunsInProgress = true;
     552          UpdateFiltering(true);
     553        } finally { UpdateOfRunsInProgress = oldUpdateRuns; }
     554      }
    548555    }
    549556    #endregion
     
    551558    #region Modification
    552559    public void Modify() {
    553       var oldUpateRuns = UpdateOfRunsInProgress;
    554       UpdateOfRunsInProgress = true;
    555560      var runs = this.ToList();
    556561      var selectedRuns = runs.Where(r => r.Visible).ToList();
     
    566571        }
    567572      }
    568       UpdateOfRunsInProgress = oldUpateRuns;
    569573    }
    570574
Note: See TracChangeset for help on using the changeset viewer.