Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/14 20:15:28 (8 years ago)
Author:
mkommend
Message:

#2206: Bug fixes regarding the deletion of rows in the grid display and code simplifications.

Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4
Files:
2 edited

Legend:

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

    r11068 r11098  
    212212
    213213    public override void DeleteRowsWithIndices(IEnumerable<int> rows) {
    214       foreach (int rowIndex in rows) {
    215         DeleteRow(rowIndex);
    216       }
     214      SaveSnapshot(DataPreprocessingChangedEventType.AddRow, -1, -1);
     215      foreach (int rowIndex in rows.OrderByDescending(x => x)) {
     216        foreach (IList column in variableValues) {
     217          column.RemoveAt(rowIndex);
     218        }
     219      }
     220      if (!IsInTransaction)
     221        OnChanged(DataPreprocessingChangedEventType.DeleteRow, -1, -1);
    217222    }
    218223
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r11068 r11098  
    4242
    4343    public IDataAnalysisProblemData CreateProblemData() {
     44      if (context.Data.Rows == 0 || context.Data.Columns == 0) return null;
     45
    4446      var oldProblemData = context.ProblemData;
    45 
    4647      IDataAnalysisProblemData problemData;
    4748
Note: See TracChangeset for help on using the changeset viewer.