Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7992


Ignore:
Timestamp:
06/12/12 15:13:03 (12 years ago)
Author:
sforsten
Message:

#1858: Multiple ColumnGroups can be deleted at once and are inserted correctly if the command is undone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeDataset/DeleteColumnGroupCommand.cs

    r7267 r7992  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    2623using HeuristicLab.DataImporter.Data;
    2724using HeuristicLab.DataImporter.Data.CommandBase;
     
    3128namespace HeuristicLab.DataImporter.Command {
    3229  [StorableClass]
    33   [ViewableCommandInfoAttribute("Delete ColumnGroup", 1, ColumnGroupState.Active, "ColumnGroup Commands", Position = 1)]
     30  [ViewableCommandInfoAttribute("Delete ColumnGroup", 1, ColumnGroupState.Active, "ColumnGroup Commands", Position = 1, MinActiveColumnGroups = 1)]
    3431  public class DeleteColumnGroupCommand : DataSetCommandWithAffectedColumnGroupsBase {
    3532    private List<KeyValuePair<int, ColumnGroup>> deletedColumnGroups;
     
    6259    public override void UndoExecute() {
    6360      base.UndoExecute();
     61      deletedColumnGroups.Reverse();
    6462      for (int i = 0; i < deletedColumnGroups.Count; i++)
    6563        this.DataSet.InsertColumnGroup(deletedColumnGroups[i].Key, deletedColumnGroups[i].Value);
Note: See TracChangeset for help on using the changeset viewer.