Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 15:32:12 (9 years ago)
Author:
dglaser
Message:

#2388: Merged trunk into HiveStatistics branch

Location:
branches/HiveStatistics/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources

  • branches/HiveStatistics/sources/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs

    r12152 r12689  
    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       if (!suppressUpdates) {
    101         UpdateUI();
    102       }
    103     }
    104 
    105     private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
    106       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      }
    107118    }
    108119
    109120    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
    110       suppressUpdates = Content.UpdateOfRunsInProgress;
    111       UpdateUI();
     121      if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_UpdateOfRunsInProgressChanged, sender, e);
     122      else {
     123        suppressUpdates = Content.UpdateOfRunsInProgress;
     124        UpdateUI();
     125      }
    112126    }
    113127    #endregion
    114128
    115129    private void UpdateUI() {
    116       if (!suppressUpdates) {
    117         RebuildCorrelationTable();
    118       }
     130      RebuildCorrelationTable();
    119131    }
    120132
Note: See TracChangeset for help on using the changeset viewer.