Changeset 9056
- Timestamp:
- 12/14/12 12:25:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
r9055 r9056 73 73 cutToolStripMenuItem.Visible = true; 74 74 removeToolStripMenuItem.Visible = true; 75 75 76 pasteToolStripMenuItem.Visible = true; 76 pasteToolStripMenuItem.Enabled = tempNode != null && insertNodeToolStripMenuItem.Enabled; 77 pasteToolStripMenuItem.Enabled = tempNode != null && insertNodeToolStripMenuItem.Enabled 78 && !(lastOp == EditOp.CutSubtree 79 && tempNode.IterateNodesBreadth().Contains(currSelected.SymbolicExpressionTreeNode)); 77 80 } 78 81 } … … 214 217 case EditOp.CutSubtree: { 215 218 if (tempNode.IterateNodesBreadth().Contains(node)) 216 goto case EditOp.CopySubtree; // a subtree cannot be cut/pasted onto itself 217 ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent 218 ModifyTree(Tree, node, null, tempNode); //insert it as a child to the new parent 219 lastOp = EditOp.CopySubtree; //do this so the next paste will actually perform a copy 219 throw new ArgumentException(); 220 220 break; 221 221 }
Note: See TracChangeset
for help on using the changeset viewer.