Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/14 13:09:51 (10 years ago)
Author:
sbreuer
Message:
  • do filtering in transaction, so the content changed event is only fired once
  • fix bug with apply filter
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/FilterLogic.cs

    r10930 r10939  
    7474
    7575    public void Apply(IList<IFilter> filters, bool isAndCombination) {
    76       preprocessingData.SetFilter(Preview(filters, isAndCombination));
    7776      preprocessingData.PersistFilter();
     77      Reset();
    7878    }
    7979
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/FilteredPreprocessingData.cs

    r10900 r10939  
    110110
    111111    public void SetFilter(bool[] rowFilters) {
    112 
    113112      filteredData = (ITransactionalPreprocessingData)originalData.Clone();
    114 
    115       for (int row = (rowFilters.Length - 1); row >= 0; --row) {
    116         if (rowFilters[row]) {
    117           filteredData.DeleteRow(row);
     113      filteredData.InTransaction(() => {
     114        for (int row = (rowFilters.Length - 1); row >= 0; --row) {
     115          if (rowFilters[row]) {
     116            filteredData.DeleteRow(row);
     117          }
    118118        }
    119       }
    120 
     119      });
    121120      OnFilterChanged();
    122121    }
Note: See TracChangeset for help on using the changeset viewer.