Changeset 12983 for trunk/sources/HeuristicLab.DataPreprocessing
- Timestamp:
- 10/06/15 16:41:59 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.DataPreprocessing/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs
r12676 r12983 75 75 } 76 76 set { 77 //not supported77 throw new NotSupportedException(); 78 78 } 79 79 } … … 84 84 } 85 85 set { 86 //not supported86 throw new NotSupportedException(); 87 87 } 88 88 } -
trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/TransactionalPreprocessingData.cs
r12012 r12983 98 98 public override void SetCell<T>(int columnIndex, int rowIndex, T value) { 99 99 SaveSnapshot(DataPreprocessingChangedEventType.ChangeItem, columnIndex, rowIndex); 100 101 for (int i = Rows; i <= rowIndex; i++) 102 InsertRow(i); 103 for (int i = Columns; i <= columnIndex; i++) 104 InsertColumn<T>(i.ToString(), i); 105 100 106 variableValues[columnIndex][rowIndex] = value; 101 107 if (!IsInTransaction) … … 116 122 117 123 public override bool VariableHasType<T>(int columnIndex) { 118 return variableValues[columnIndex] is List<T>;124 return columnIndex >= variableValues.Count || variableValues[columnIndex] is List<T>; 119 125 } 120 126 … … 242 248 public override void InsertColumn<T>(string variableName, int columnIndex) { 243 249 SaveSnapshot(DataPreprocessingChangedEventType.DeleteColumn, columnIndex, -1); 244 variableValues.Insert(columnIndex, new List<T>( Rows));250 variableValues.Insert(columnIndex, new List<T>(Enumerable.Repeat(default(T), Rows))); 245 251 variableNames.Insert(columnIndex, variableName); 246 252 if (!IsInTransaction) -
trunk/sources/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs
r12676 r12983 63 63 var inputVariables = oldProblemData.InputVariables.ToDictionary(x => x.Value, x => x); 64 64 foreach (var variable in problemData.InputVariables) { 65 bool isChecked = oldProblemData.InputVariables. ItemChecked(inputVariables[variable.Value]);65 bool isChecked = oldProblemData.InputVariables.Contains(variable) && oldProblemData.InputVariables.ItemChecked(inputVariables[variable.Value]); 66 66 problemData.InputVariables.SetItemCheckedState(variable, isChecked); 67 67 }
Note: See TracChangeset
for help on using the changeset viewer.