Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8676


Ignore:
Timestamp:
09/21/12 10:19:59 (12 years ago)
Author:
mkommend
Message:

#1956: Changed AddNewProgrammableColumnCommand to respect the currently selected columns.

Location:
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup/AddNewColumnCommandBase.cs

    r7732 r8676  
    6666      newColumn.Resize(ColumnGroup.RowCount);
    6767
    68       ColumnBase cb = ColumnGroup.Columns.Where(x => x.Selected).FirstOrDefault();
     68      ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected);
    6969      if (cb != null) {
    7070        ColumnGroup.InsertColumn(ColumnGroup.IndexOfColumn(cb) + 1, NewColumn);
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup/AddNewProgrammableColumnCommand.cs

    r7267 r8676  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    2422using System.Linq;
    25 using System.Text;
    26 using System.Xml;
     23using HeuristicLab.DataImporter.Command.View;
     24using HeuristicLab.DataImporter.Data;
    2725using HeuristicLab.DataImporter.Data.CommandBase;
    2826using HeuristicLab.DataImporter.Data.Model;
    29 using HeuristicLab.DataImporter.Data;
    30 using HeuristicLab.DataImporter.Command.View;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3228
     
    7066      }
    7167
    72       ColumnGroup.AddColumn(NewColumn);
     68      ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected);
     69      if (cb != null) {
     70        ColumnGroup.InsertColumn(ColumnGroup.IndexOfColumn(cb) + 1, NewColumn);
     71      } else {
     72        ColumnGroup.AddColumn(NewColumn);
     73      }
    7374      ColumnGroup.FireChanged();
    7475      ColumnGroup = null;
Note: See TracChangeset for help on using the changeset viewer.