Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/11/15 13:37:32 (9 years ago)
Author:
ascheibe
Message:

#2270 and #2354: merged r12173, r12458, r12077, r12599, r12613, r12112, r12116, r12117, r12131, r12631, r12672, r12684, r12690, r12692 into stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs

    r12199 r12725  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Collections;
    2526using HeuristicLab.Core.Views;
    2627using HeuristicLab.Data;
     
    8182      Content.ColumnsChanged += Content_ColumnsChanged;
    8283      Content.RowsChanged += Content_RowsChanged;
    83       Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
     84      Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
    8485      Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged;
    8586    }
     
    8990      Content.ColumnsChanged -= Content_ColumnsChanged;
    9091      Content.RowsChanged -= Content_RowsChanged;
    91       Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
     92      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
    9293      Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged;
    9394    }
    9495
    9596    void Content_RowsChanged(object sender, EventArgs e) {
    96       UpdateUI();
     97      if (suppressUpdates) return;
     98      if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_RowsChanged, sender, e);
     99      else {
     100        UpdateUI();
     101      }
    97102    }
    98103
    99104    void Content_ColumnsChanged(object sender, EventArgs e) {
    100       UpdateUI();
    101     }
    102 
    103     private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
    104       UpdateUI();
     105      if (suppressUpdates) return;
     106      if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_ColumnsChanged, sender, e);
     107      else {
     108        UpdateUI();
     109      }
     110    }
     111
     112    private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
     113      if (suppressUpdates) return;
     114      if (InvokeRequired) Invoke((Action<object, CollectionItemsChangedEventArgs<IRun>>)Content_CollectionReset, sender, e);
     115      else {
     116        UpdateUI();
     117      }
    105118    }
    106119
    107120    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
    108       suppressUpdates = Content.UpdateOfRunsInProgress;
    109       UpdateUI();
     121      if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_UpdateOfRunsInProgressChanged, sender, e);
     122      else {
     123        suppressUpdates = Content.UpdateOfRunsInProgress;
     124        UpdateUI();
     125      }
    110126    }
    111127    #endregion
    112128
    113129    private void UpdateUI() {
    114       if (!suppressUpdates) {
    115         RebuildCorrelationTable();
    116       }
     130      RebuildCorrelationTable();
    117131    }
    118132
Note: See TracChangeset for help on using the changeset viewer.