Changeset 2729 for trunk/sources/HeuristicLab.GP/3.3/FunctionView.cs
- Timestamp:
- 02/01/10 16:40:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/3.3/FunctionView.cs
r2728 r2729 187 187 if (subFunctionsListBox.SelectedItems.Count > 0 && e.KeyCode == Keys.Delete) { 188 188 if (selectedSlot == ALL_SLOTS) { 189 List<IFunction> removedSubFunctions = new List<IFunction>(subFunctionsListBox.SelectedItems.Cast<IFunction>()); 189 190 for (int slot = 0; slot < function.MaxSubTrees; slot++) { 190 foreach (var subFun in subFunctionsListBox.SelectedItems) {191 foreach (var subFun in removedSubFunctions) { 191 192 function.RemoveAllowedSubFunction((IFunction)subFun, slot); 192 193 } … … 194 195 } else { 195 196 int slot = int.Parse(selectedSlot); 196 foreach (var subFun in subFunctionsListBox.SelectedItems) { 197 function.RemoveAllowedSubFunction((IFunction)subFun, slot); 197 List<IFunction> removedSubFunctions = new List<IFunction>(subFunctionsListBox.SelectedItems.Cast<IFunction>()); 198 foreach (var subFun in removedSubFunctions) { 199 function.RemoveAllowedSubFunction(subFun, slot); 198 200 } 199 201 }
Note: See TracChangeset
for help on using the changeset viewer.