Changeset 2868 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/UngroupTool.cs
- Timestamp:
- 02/25/10 17:28:31 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/UngroupTool.cs
r2768 r2868 39 39 40 40 //make sure we have the correct stuff on the table 41 if ( Selection.SelectedItems==null || Selection.SelectedItems.Count ==0)41 if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) 42 42 { 43 43 MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand); 44 44 valid = false; 45 } 46 else if (Selection.SelectedItems.Count != 1) 45 } else if (this.Controller.Model.Selection.SelectedItems.Count != 1) 47 46 { 48 47 MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand); 49 48 valid = false; 50 } 51 else if (!(Selection.SelectedItems[0] is IGroup)) 49 } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup)) 52 50 { 53 51 MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand); … … 58 56 if (valid) 59 57 { 60 UngroupCommand cmd = new UngroupCommand(this.Controller,Selection.SelectedItems[0] as IGroup);58 UngroupCommand cmd = new UngroupCommand(this.Controller, this.Controller.Model.Selection.SelectedItems[0] as IGroup); 61 59 this.Controller.UndoManager.AddUndoCommand(cmd); 62 60 cmd.Redo();
Note: See TracChangeset
for help on using the changeset viewer.