Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10581 for branches


Ignore:
Timestamp:
03/12/14 15:53:38 (11 years ago)
Author:
tsteinre
Message:
  • removed index workaround in PreprocessingData Undo-Feature event handling.
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramLogic.cs

    r10558 r10581  
    8484    }
    8585
     86    //TODO: refactor: possible code duplication with LineChartLogic
    8687    void PreprocessingData_Changed(object sender, DataPreprocessingChangedEventArgs e) {
    87       var variableName = preprocessingData.GetVariableName(e.Column);
    8888      switch (e.Type) {
    8989        case DataPreprocessingChangedEventType.DeleteColumn:
    90           dataTable.Rows.Remove(variableName);
     90          dataTable.Rows.Remove(preprocessingData.GetVariableName(e.Column));
    9191          break;
    9292        case DataPreprocessingChangedEventType.AddColumn:
    93           dataTable.Rows.Add(new DataRow(variableName, String.Empty, preprocessingData.GetValues<double>(e.Column)));
     93          dataTable.Rows.Add(new DataRow(preprocessingData.GetVariableName(e.Column), String.Empty, preprocessingData.GetValues<double>(e.Column)));
    9494          break;
    9595        case DataPreprocessingChangedEventType.ChangeColumn:
    9696        case DataPreprocessingChangedEventType.ChangeItem:
    97           dataTable.Rows.Remove(variableName);
    98           dataTable.Rows.Add(new DataRow(variableName, String.Empty, preprocessingData.GetValues<double>(e.Column)));
     97          dataTable.Rows.Remove(preprocessingData.GetVariableName(e.Column));
     98          dataTable.Rows.Add(new DataRow(preprocessingData.GetVariableName(e.Column), String.Empty, preprocessingData.GetValues<double>(e.Column)));
    9999          break;
    100100        case DataPreprocessingChangedEventType.DeleteRow:
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartLogic.cs

    r10573 r10581  
    8282    }
    8383
     84    //TODO: refactor: possible code duplication with HistogramLogic
    8485    void PreprocessingData_Changed(object sender, DataPreprocessingChangedEventArgs e) {
    85       var variableName = preprocessingData.GetVariableName(e.Column);
    8686      switch (e.Type) {
    8787        case DataPreprocessingChangedEventType.DeleteColumn:
    88           dataTable.Rows.Remove(variableName);
     88          dataTable.Rows.Remove(preprocessingData.GetVariableName(e.Column));
    8989          break;
    9090        case DataPreprocessingChangedEventType.AddColumn:
    91           dataTable.Rows.Add(new DataRow(variableName, String.Empty, preprocessingData.GetValues<double>(e.Column)));
     91          dataTable.Rows.Add(new DataRow(preprocessingData.GetVariableName(e.Column), String.Empty, preprocessingData.GetValues<double>(e.Column)));
    9292          break;
    9393        case DataPreprocessingChangedEventType.ChangeColumn:
    9494        case DataPreprocessingChangedEventType.ChangeItem:
    95           dataTable.Rows.Remove(variableName);
    96           dataTable.Rows.Add(new DataRow(variableName, String.Empty, preprocessingData.GetValues<double>(e.Column)));
     95          dataTable.Rows.Remove(preprocessingData.GetVariableName(e.Column));
     96          dataTable.Rows.Add(new DataRow(preprocessingData.GetVariableName(e.Column), String.Empty, preprocessingData.GetValues<double>(e.Column)));
    9797          break;
    9898        case DataPreprocessingChangedEventType.DeleteRow:
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs

    r10580 r10581  
    278278
    279279    public void BeginTransaction() {
    280       SaveSnapshot(DataPreprocessingChangedEventType.Any, 0, 0); //TODO: fix event handling, so that the ints can be -1, -1
     280      SaveSnapshot(DataPreprocessingChangedEventType.Any, -1, -1);
    281281      transactionDepth++;
    282282    }
     
    287287        throw new InvalidOperationException("There is no open transaction that can be ended.");
    288288      if (transactionDepth == 0)
    289         OnChanged(DataPreprocessingChangedEventType.Any, 0, 0); //TODO: fix event handling, so that the ints can be -1, -1
     289        OnChanged(DataPreprocessingChangedEventType.Any, -1, -1);
    290290    }
    291291
Note: See TracChangeset for help on using the changeset viewer.