Changeset 2868 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools
- Timestamp:
- 02/25/10 17:28:31 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTool.cs
r2768 r2868 63 63 64 64 //make sure we have the correct stuff on the table 65 if ( Selection.SelectedItems==null || Selection.SelectedItems.Count ==0)65 if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) 66 66 { 67 67 MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand); 68 68 valid = false; 69 } 70 else if (Selection.SelectedItems.Count != 1) 69 } else if (this.Controller.Model.Selection.SelectedItems.Count != 1) 71 70 { 72 71 MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand); 73 72 valid = false; 74 } 75 else if (!(Selection.SelectedItems[0] is IGroup)) 73 } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup)) 76 74 { 77 75 MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand); … … 83 81 { 84 82 UngroupCommand cmd = new UngroupCommand( 85 this.Controller, 86 83 this.Controller, 84 this.Controller.Model.Selection.SelectedItems[0] as IGroup); 87 85 88 86 this.Controller.UndoManager.AddUndoCommand(cmd); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignmentToolBase.cs
r2768 r2868 42 42 43 43 // Make sure enough items were selected. 44 if ( Selection.SelectedItems == null)44 if (this.Controller.Model.Selection.SelectedItems == null) 45 45 { 46 46 MessageBox.Show( … … 54 54 } 55 55 56 if ( Selection.SelectedItems.Count <= 1)56 if (this.Controller.Model.Selection.SelectedItems.Count <= 1) 57 57 { 58 58 MessageBox.Show( … … 68 68 // first get all aspects about the location of the first 69 69 // entity. 70 this.firstEntity = Selection.SelectedItems[0];70 this.firstEntity = this.Controller.Model.Selection.SelectedItems[0]; 71 71 this.xLocationOfFirstEntity = firstEntity.Rectangle.X; 72 72 this.yLocationOfFirstEntity = firstEntity.Rectangle.Y; … … 76 76 this.centerOfFirstEntity = firstEntity.Center; 77 77 78 this.Align( Selection.SelectedItems.ToArray());78 this.Align(this.Controller.Model.Selection.SelectedItems.ToArray()); 79 79 80 80 // Reset the Tracker. -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs
r2861 r2868 66 66 if (foundConnector != null) 67 67 foundConnector.Hovered = false; 68 foundConnector = Selection.FindConnectorAt(e.Location);68 foundConnector = this.Controller.Model.Selection.FindConnectorAt(e.Location); 69 69 if (foundConnector != null) 70 70 foundConnector.Hovered = true; … … 103 103 //otherwise the search would find the endpoints of the newly created connection, which 104 104 //would create a loop and a stack overflow! 105 IConnector startConnector = Selection.FindConnectorAt(initialPoint);106 IConnector endConnector = Selection.FindConnectorAt(e.Location);105 IConnector startConnector = this.Controller.Model.Selection.FindConnectorAt(initialPoint); 106 IConnector endConnector = this.Controller.Model.Selection.FindConnectorAt(e.Location); 107 107 108 108 #region Create the new connection -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectorMoverTool.cs
r2768 r2868 65 65 if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) 66 66 { 67 fetchedConnector = 67 fetchedConnector =this.Controller.Model.Selection.FindShapeConnector(e.Location); 68 68 if(fetchedConnector != null) 69 69 { -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CopyTool.cs
r2768 r2868 42 42 protected override void OnActivateTool() 43 43 { 44 if(Selection.SelectedItems.Count == 0)44 if (this.Controller.Model.Selection.SelectedItems.Count == 0) 45 45 return; 46 46 … … 54 54 // First add the image to the Windows Clipboard so it can be 55 55 // pasted into other applications, like PowerPoint. 56 Bitmap image = Selection.ToBitmap();56 Bitmap image = this.Controller.Model.Selection.ToBitmap(); 57 57 Clipboard.SetDataObject(image, true); 58 58 … … 75 75 // Windows clipboard for moving data across apps. 76 76 NetronClipboard.Clear(); 77 NetronClipboard.Add( Selection.SelectedItems.Copy());77 NetronClipboard.Add(this.Controller.Model.Selection.SelectedItems.Copy()); 78 78 79 79 } -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CutTool.cs
r2768 r2868 30 30 protected override void OnActivateTool() 31 31 { 32 if ( Selection.SelectedItems.Count == 0)32 if (this.Controller.Model.Selection.SelectedItems.Count == 0) 33 33 return; 34 34 -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DeleteTool.cs
r2768 r2868 22 22 DeleteCommand cmd; 23 23 24 if ( Selection.SelectedItems.Count > 0)24 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 25 25 { 26 26 // If any one entity in the selction can't be deleted, 27 27 // remove it from the selection. 28 for (int i = 0; i < 28 for (int i = 0; i <this.Controller.Model.Selection.SelectedItems.Count; i++ ) 29 29 { 30 IDiagramEntity entity = 30 IDiagramEntity entity =this.Controller.Model.Selection.SelectedItems[i]; 31 31 if (entity.AllowDelete == false) 32 32 { 33 33 this.Controller.Model.Selection.SelectedItems.Remove(entity); 34 34 i--; 35 35 } … … 37 37 cmd = new DeleteCommand( 38 38 this.Controller, 39 39 this.Controller.Model.Selection.SelectedItems.Copy()); 40 40 this.Controller.UndoManager.AddUndoCommand(cmd); 41 41 42 42 // Alert each entity that they're about to be deleted. 43 foreach (IDiagramEntity entity in Selection.SelectedItems)43 foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) 44 44 { 45 45 entity.OnBeforeDelete(cmd); … … 49 49 50 50 // Alert each entity that they have been deleted. 51 foreach (IDiagramEntity entity in Selection.SelectedItems)51 foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) 52 52 { 53 53 entity.OnAfterDelete(cmd); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/GroupTool.cs
r2768 r2868 37 37 bool valid = true; 38 38 //make sure we have the correct stuff on the table 39 if ( Selection.SelectedItems == null ||Selection.SelectedItems.Count == 0)39 if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) 40 40 { 41 41 MessageBox.Show("Nothing is selected, you need to select at least two items to create a group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand); 42 42 valid = false; 43 } 44 else if (Selection.SelectedItems.Count <= 1) 43 } else if (this.Controller.Model.Selection.SelectedItems.Count <= 1) 45 44 { 46 45 MessageBox.Show("You need at least two items to create a group.", "Multiple items.", MessageBoxButtons.OK, MessageBoxIcon.Hand); … … 49 48 if (valid) 50 49 { 51 Bundle bundle = new Bundle(Selection.SelectedItems);50 Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems); 52 51 53 52 GroupCommand cmd = new GroupCommand(this.Controller, bundle); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HitTool.cs
r2768 r2868 91 91 // Also don't clear the selection if a group is currently 92 92 // selected so we can drill-down into it. 93 if ( Selection.SelectedItems.Count > 0)94 { 95 foreach (IDiagramEntity entity inSelection.SelectedItems)93 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 94 { 95 foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) 96 96 { 97 97 if ( (entity is IGroup) && … … 102 102 } 103 103 } 104 Selection.CollectEntitiesAt(e.Location, clearSelectionFirst);105 106 if ( Selection.SelectedItems.Count > 0)104 this.Controller.Model.Selection.CollectEntitiesAt(e.Location, clearSelectionFirst); 105 106 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 107 107 { 108 108 IMouseListener listener = 109 109 this.Controller.Model.Selection.SelectedItems[0].GetService( 110 110 typeof(IMouseListener)) as IMouseListener; 111 111 … … 117 117 } 118 118 119 if ( (Selection.SelectedItems.Count > 0) &&120 ( Selection.SelectedItems[0] is ITextProvider))119 if ((this.Controller.Model.Selection.SelectedItems.Count > 0) && 120 (this.Controller.Model.Selection.SelectedItems[0] is ITextProvider)) 121 121 { 122 122 //ActivateTool(); 123 ITextProvider textProvider = 124 123 ITextProvider textProvider = 124 this.Controller.Model.Selection.SelectedItems[0] as ITextProvider; 125 125 126 126 if ((e.Clicks == textProvider.EditTextClicks) && -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ImageExportTool.cs
r2768 r2868 40 40 protected override void OnActivateTool() 41 41 { 42 if (Selection.SelectedItems.Count == 0)42 if (this.Controller.Model.Selection.SelectedItems.Count == 0) 43 43 { 44 44 MessageBox.Show("No shapes are selected. " + … … 54 54 // Create an image using the ImageExporter and copy it to 55 55 // the clipboard. 56 Bitmap image =Selection.ToBitmap();56 Bitmap image = this.Controller.Model.Selection.ToBitmap(); 57 57 if (image != null) 58 58 { -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MoveTool.cs
r2768 r2868 79 79 if(e.Button == MouseButtons.Left && Enabled && !IsSuspended && !Blocked) 80 80 { 81 if(Selection.SelectedItems.Count > 0)81 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 82 82 { 83 83 initialPoint = e.Location; … … 94 94 // does its thing when the mouse is moved. 95 95 //return true; 96 } 97 else if(Selection.Connector != null && Selection.Connector.Parent is IConnection) 98 { 99 if(!typeof(IShape).IsInstanceOfType(Selection.Connector.Parent)) //note that there is a separate tool to move shape-connectors! 96 } else if (this.Controller.Model.Selection.Connector != null && this.Controller.Model.Selection.Connector.Parent is IConnection) 97 { 98 if (!typeof(IShape).IsInstanceOfType(this.Controller.Model.Selection.Connector.Parent)) //note that there is a separate tool to move shape-connectors! 100 99 { 101 100 initialPoint = e.Location; … … 123 122 { 124 123 //can be a connector 125 if(Selection.Connector != null)126 { 127 124 if (this.Controller.Model.Selection.Connector != null) 125 { 126 this.Controller.Model.Selection.Connector.MoveBy(new Point(point.X - lastPoint.X, point.Y - lastPoint.Y)); 128 127 #region Do we hit something meaningful? 129 128 130 129 if (hoveredConnector != null) 131 hoveredConnector.Hovered = false; 132 133 hoveredConnector = Selection.FindConnectorAt(e.Location);130 hoveredConnector.Hovered = false; 131 132 hoveredConnector = this.Controller.Model.Selection.FindConnectorAt(e.Location); 134 133 if(hoveredConnector!=null) 135 134 hoveredConnector.Hovered = true; 136 if (hoveredConnector != null && hoveredConnector!=Selection.Connector)135 if (hoveredConnector != null && hoveredConnector != this.Controller.Model.Selection.Connector) 137 136 { 138 137 Controller.View.CurrentCursor = CursorPalette.Grip; … … 145 144 else //can be a selection 146 145 { 147 foreach(IDiagramEntity entity inSelection.SelectedItems)146 foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) 148 147 { 149 148 if (entity.AllowMove) … … 204 203 #region Is the connector attached? 205 204 //detach only if there is a parent different than a connection; the join of a chained connection is allowed to move 206 if( Selection.Connector.AttachedTo != null && !typeof(IConnection).IsInstanceOfType(Selection.Connector.AttachedTo))207 { 208 DetachConnectorCommand detach = new DetachConnectorCommand(this.Controller, Selection.Connector.AttachedTo,Selection.Connector);205 if (this.Controller.Model.Selection.Connector.AttachedTo != null && !typeof(IConnection).IsInstanceOfType(this.Controller.Model.Selection.Connector.AttachedTo)) 206 { 207 DetachConnectorCommand detach = new DetachConnectorCommand(this.Controller, this.Controller.Model.Selection.Connector.AttachedTo, this.Controller.Model.Selection.Connector); 209 208 detach.Redo(); 210 209 package.Commands.Add(detach); … … 216 215 //a bundle might look like overkill here but it makes the coding model uniform 217 216 Bundle bundle = new Bundle(Controller.Model); 218 bundle.Entities.Add( Selection.Connector);217 bundle.Entities.Add(this.Controller.Model.Selection.Connector); 219 218 MoveCommand move = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y)); 220 219 //no Redo() necessary here! … … 231 230 //whatever, except itself and any children of the moved connector 232 231 //since this would entail a child becoming a parent! 233 if(conn.Hit(e.Location) && conn != Selection.Connector && !Selection.Connector.AttachedConnectors.Contains(conn))232 if (conn.Hit(e.Location) && conn != this.Controller.Model.Selection.Connector && !this.Controller.Model.Selection.Connector.AttachedConnectors.Contains(conn)) 234 233 return true; 235 234 return false; 236 235 }; 237 236 //find it! 238 IConnector parentConnector = Selection.FindConnector(predicate);237 IConnector parentConnector = this.Controller.Model.Selection.FindConnector(predicate); 239 238 240 239 if(parentConnector != null) //aha, there's an attachment 241 240 { 242 BindConnectorsCommand binder = new BindConnectorsCommand(this.Controller, parentConnector, Selection.Connector);241 BindConnectorsCommand binder = new BindConnectorsCommand(this.Controller, parentConnector, this.Controller.Model.Selection.Connector); 243 242 package.Commands.Add(binder); 244 243 binder.Redo(); //this one is necessary since the redo cannot be performed on the whole compound command … … 253 252 #region We are moving entities other than a connector 254 253 Bundle bundle = new Bundle(Controller.Model); 255 bundle.Entities.AddRange( Selection.SelectedItems);254 bundle.Entities.AddRange(this.Controller.Model.Selection.SelectedItems); 256 255 MoveCommand cmd = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y)); 257 256 package.Commands.Add(cmd); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SelectionTool.cs
r2768 r2868 74 74 if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) 75 75 { 76 if(Selection.SelectedItems.Count == 0 && Selection.Connector==null)76 if (this.Controller.Model.Selection.SelectedItems.Count == 0 && this.Controller.Model.Selection.Connector == null) 77 77 { 78 78 initialPoint = e.Location; … … 125 125 if(Controller.View.Ghost != null) 126 126 { 127 127 this.Controller.Model.Selection.CollectEntitiesInside( 128 128 Controller.View.Ghost.Rectangle);//world space 129 129 130 130 Controller.RaiseOnShowSelectionProperties( 131 131 new SelectionEventArgs( 132 132 this.Controller.Model.Selection.SelectedItems.ToArray())); 133 133 } 134 134 Controller.View.ResetGhost(); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendBackwardsTool.cs
r2768 r2868 35 35 protected override void OnActivateTool() 36 36 { 37 if(Selection.SelectedItems!=null && Selection.SelectedItems.Count>0)37 if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) 38 38 { 39 39 /* … … 41 41 */ 42 42 #region Preparation of the ordering 43 Debug.Assert(Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");43 Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity."); 44 44 //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us. 45 45 SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>(); 46 46 //We fetch a flattened selection, which means that if there is a group the constituents will be 47 47 //returned rather than the group itself. 48 foreach (IDiagramEntity entity in Selection.FlattenedSelectionItems)48 foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) 49 49 { 50 50 //the addition will automatically put the item in increasing order -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendForwardsTool.cs
r2768 r2868 41 41 * is small. 42 42 */ 43 if(Selection.SelectedItems!=null && Selection.SelectedItems.Count>0)43 if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) 44 44 { 45 45 … … 48 48 */ 49 49 #region Preparation of the ordering 50 Debug.Assert(Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");50 Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity."); 51 51 //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us. 52 52 SortedList<int, IDiagramEntity> list = new SortedList<int,IDiagramEntity>(); 53 53 //We fetch a flattened selection, which means that if there is a group the constituents will be 54 54 //returned rather than the group itself. 55 foreach (IDiagramEntity entity inSelection.FlattenedSelectionItems)55 foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) 56 56 { 57 57 //the addition will automatically put the item in increasing order -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToBackTool.cs
r2768 r2868 35 35 protected override void OnActivateTool() 36 36 { 37 if(Selection.SelectedItems != null &&Selection.SelectedItems.Count > 0)37 if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) 38 38 { 39 39 #region Preparation of the ordering … … 43 43 44 44 SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>(); 45 foreach (IDiagramEntity entity inSelection.FlattenedSelectionItems)45 foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) 46 46 { 47 47 //the addition will automatically put the item in increasing order -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToFrontTool.cs
r2768 r2868 35 35 protected override void OnActivateTool() 36 36 { 37 if(Selection.SelectedItems != null &&Selection.SelectedItems.Count > 0)37 if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) 38 38 { 39 39 #region Preparation of the ordering … … 43 43 44 44 SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>(); 45 foreach (IDiagramEntity entity inSelection.FlattenedSelectionItems)45 foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) 46 46 { 47 47 //the addition will automatically put the item in increasing order -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/TransformTool.cs
r2768 r2868 300 300 { 301 301 302 if (Selection.SelectedItems.Count > 0)302 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 303 303 { 304 304 UpdateState(e); … … 331 331 //take the flat selection and keep the current state as a reference for the transformation 332 332 //until the mouseup pins down the final scaling 333 foreach (IDiagramEntity entity in Selection.FlattenedSelectionItems)333 foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) 334 334 { 335 335 if (!entity.Resizable) continue;//only take what's resizable … … 574 574 // are unaware of the resize, so we have to recalculate 575 575 // the group rectangles. 576 foreach (IDiagramEntity entity in Selection.SelectedItems)576 foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) 577 577 { 578 578 //the calculation will cascade to subgroups if necessary -
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(); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomToolBase.cs
r2768 r2868 80 80 // if there are any? This will allow the user to zoom in on 81 81 // a selection. 82 if ( Selection.SelectedItems.Count > 0)82 if (this.Controller.Model.Selection.SelectedItems.Count > 0) 83 83 { 84 Bundle bundle = new Bundle(Selection.SelectedItems);84 Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems); 85 85 Point bundleLocation = bundle.Rectangle.Location; 86 86
Note: See TracChangeset
for help on using the changeset viewer.