Changeset 9595
- Timestamp:
- 06/06/13 14:50:43 (11 years ago)
- Location:
- branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup/AddNewColumnCommandBase.cs
r8676 r9595 48 48 49 49 [Storable] 50 private int columnIndex = -1; 51 protected int ColumnIndex { 52 get { return this.columnIndex; } 53 set { this.columnIndex = value; } 54 } 55 56 [Storable] 50 57 private string columnName; 51 58 protected string ColumnName { … … 66 73 newColumn.Resize(ColumnGroup.RowCount); 67 74 68 ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected); 69 if (cb != null) { 70 ColumnGroup.InsertColumn(ColumnGroup.IndexOfColumn(cb) + 1, NewColumn); 75 if (ColumnIndex == -1) { 76 ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected); 77 if (cb != null) ColumnIndex = ColumnGroup.IndexOfColumn(cb); 78 } 79 if (ColumnIndex != -1) { 80 ColumnGroup.InsertColumn(ColumnIndex + 1, NewColumn); 71 81 } else { 72 82 ColumnGroup.AddColumn(NewColumn); -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup/AddNewProgrammableColumnCommand.cs
r8676 r9595 66 66 } 67 67 68 ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected); 69 if (cb != null) { 70 ColumnGroup.InsertColumn(ColumnGroup.IndexOfColumn(cb) + 1, NewColumn); 68 if (ColumnIndex == -1) { 69 ColumnBase cb = ColumnGroup.Columns.FirstOrDefault(x => x.Selected); 70 if (cb != null) ColumnIndex = ColumnGroup.IndexOfColumn(cb); 71 } 72 if (ColumnIndex != -1) { 73 ColumnGroup.InsertColumn(ColumnIndex + 1, NewColumn); 71 74 } else { 72 75 ColumnGroup.AddColumn(NewColumn);
Note: See TracChangeset
for help on using the changeset viewer.