Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/25/10 17:28:31 (15 years ago)
Author:
mkommend
Message:

finished mapping from OperatorGraph to GraphVisualizationInfo (ticket #867)

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  
    6363           
    6464            //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)
    6666            {
    6767                MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
    6868                valid = false;               
    69             }
    70             else if (Selection.SelectedItems.Count != 1)
     69            } else if (this.Controller.Model.Selection.SelectedItems.Count != 1)
    7170            {
    7271                MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
    7372                valid = false;
    74             }
    75             else if (!(Selection.SelectedItems[0] is IGroup))
     73            } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup))
    7674            {
    7775                MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     
    8381            {
    8482                UngroupCommand cmd = new UngroupCommand(
    85                     this.Controller, 
    86                     Selection.SelectedItems[0] as IGroup);
     83                    this.Controller,
     84                   this.Controller.Model.Selection.SelectedItems[0] as IGroup);
    8785
    8886                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  
    4242
    4343            // Make sure enough items were selected.
    44             if (Selection.SelectedItems == null)
     44            if (this.Controller.Model.Selection.SelectedItems == null)
    4545            {
    4646                MessageBox.Show(
     
    5454            }
    5555
    56             if (Selection.SelectedItems.Count <= 1)
     56            if (this.Controller.Model.Selection.SelectedItems.Count <= 1)
    5757            {
    5858                MessageBox.Show(
     
    6868            // first get all aspects about the location of the first
    6969            // entity.
    70             this.firstEntity = Selection.SelectedItems[0];
     70            this.firstEntity = this.Controller.Model.Selection.SelectedItems[0];
    7171            this.xLocationOfFirstEntity = firstEntity.Rectangle.X;
    7272            this.yLocationOfFirstEntity = firstEntity.Rectangle.Y;
     
    7676            this.centerOfFirstEntity = firstEntity.Center;
    7777
    78             this.Align(Selection.SelectedItems.ToArray());
     78            this.Align(this.Controller.Model.Selection.SelectedItems.ToArray());
    7979
    8080            // 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  
    6666        if (foundConnector != null)
    6767          foundConnector.Hovered = false;
    68         foundConnector = Selection.FindConnectorAt(e.Location);
     68        foundConnector = this.Controller.Model.Selection.FindConnectorAt(e.Location);
    6969        if (foundConnector != null)
    7070          foundConnector.Hovered = true;
     
    103103        //otherwise the search would find the endpoints of the newly created connection, which
    104104        //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);
    107107
    108108        #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  
    6565            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
    6666            {
    67                 fetchedConnector = Selection.FindShapeConnector(e.Location);
     67                fetchedConnector =this.Controller.Model.Selection.FindShapeConnector(e.Location);
    6868                if(fetchedConnector != null)
    6969                {
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CopyTool.cs

    r2768 r2868  
    4242        protected override void OnActivateTool()
    4343        {
    44             if(Selection.SelectedItems.Count == 0)
     44          if (this.Controller.Model.Selection.SelectedItems.Count == 0)
    4545                return;
    4646
     
    5454                // First add the image to the Windows Clipboard so it can be
    5555                // pasted into other applications, like PowerPoint.
    56                 Bitmap image = Selection.ToBitmap();
     56                Bitmap image = this.Controller.Model.Selection.ToBitmap();
    5757                Clipboard.SetDataObject(image, true);
    5858
     
    7575                // Windows clipboard for moving data across apps.
    7676                NetronClipboard.Clear();
    77                 NetronClipboard.Add(Selection.SelectedItems.Copy());
     77                NetronClipboard.Add(this.Controller.Model.Selection.SelectedItems.Copy());
    7878               
    7979            }
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CutTool.cs

    r2768 r2868  
    3030        protected override void OnActivateTool()
    3131        {
    32             if (Selection.SelectedItems.Count == 0)
     32            if (this.Controller.Model.Selection.SelectedItems.Count == 0)
    3333                return;
    3434
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DeleteTool.cs

    r2768 r2868  
    2222            DeleteCommand cmd;
    2323
    24             if (Selection.SelectedItems.Count > 0)
     24            if (this.Controller.Model.Selection.SelectedItems.Count > 0)
    2525            {
    2626                // If any one entity in the selction can't be deleted,
    2727                // remove it from the selection.
    28                 for (int i = 0; i < Selection.SelectedItems.Count; i++ )
     28                for (int i = 0; i <this.Controller.Model.Selection.SelectedItems.Count; i++ )
    2929                {
    30                     IDiagramEntity entity = Selection.SelectedItems[i];
     30                    IDiagramEntity entity =this.Controller.Model.Selection.SelectedItems[i];
    3131                    if (entity.AllowDelete == false)
    3232                    {
    33                         Selection.SelectedItems.Remove(entity);
     33                       this.Controller.Model.Selection.SelectedItems.Remove(entity);
    3434                        i--;
    3535                    }
     
    3737                cmd = new DeleteCommand(
    3838                        this.Controller,
    39                         Selection.SelectedItems.Copy());
     39                       this.Controller.Model.Selection.SelectedItems.Copy());
    4040                this.Controller.UndoManager.AddUndoCommand(cmd);
    4141
    4242                // 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)
    4444                {
    4545                    entity.OnBeforeDelete(cmd);
     
    4949
    5050                // 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)
    5252                {
    5353                    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  
    3737            bool valid = true;
    3838            //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)
    4040            {
    4141                MessageBox.Show("Nothing is selected, you need to select at least two items to create a group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
    4242                valid = false;
    43             }
    44             else if (Selection.SelectedItems.Count <= 1)
     43            } else if (this.Controller.Model.Selection.SelectedItems.Count <= 1)
    4544            {
    4645                MessageBox.Show("You need at least two items to create a group.", "Multiple items.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     
    4948            if (valid)
    5049            {
    51                 Bundle bundle = new Bundle(Selection.SelectedItems);
     50              Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
    5251
    5352                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  
    9191                // Also don't clear the selection if a group is currently
    9292                // selected so we can drill-down into it.
    93                 if (Selection.SelectedItems.Count > 0)
    94                 {
    95                     foreach (IDiagramEntity entity in Selection.SelectedItems)
     93                if (this.Controller.Model.Selection.SelectedItems.Count > 0)
     94                {
     95                  foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
    9696                    {
    9797                        if ( (entity is IGroup) &&
     
    102102                    }
    103103                }
    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)
    107107                {
    108108                    IMouseListener listener =
    109                         Selection.SelectedItems[0].GetService(
     109                       this.Controller.Model.Selection.SelectedItems[0].GetService(
    110110                        typeof(IMouseListener)) as IMouseListener;
    111111
     
    117117                }
    118118
    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))
    121121                {
    122122                    //ActivateTool();
    123                     ITextProvider textProvider = 
    124                         Selection.SelectedItems[0] as ITextProvider;
     123                    ITextProvider textProvider =
     124                       this.Controller.Model.Selection.SelectedItems[0] as ITextProvider;
    125125
    126126                    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  
    4040        protected override void OnActivateTool()
    4141        {
    42             if (Selection.SelectedItems.Count == 0)
     42          if (this.Controller.Model.Selection.SelectedItems.Count == 0)
    4343            {
    4444                MessageBox.Show("No shapes are selected.  " +
     
    5454                // Create an image using the ImageExporter and copy it to
    5555                // the clipboard.
    56                 Bitmap image = Selection.ToBitmap();
     56              Bitmap image = this.Controller.Model.Selection.ToBitmap();
    5757                if (image != null)
    5858                {                   
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MoveTool.cs

    r2768 r2868  
    7979            if(e.Button == MouseButtons.Left && Enabled && !IsSuspended && !Blocked)
    8080            {
    81                 if(Selection.SelectedItems.Count > 0)
     81              if (this.Controller.Model.Selection.SelectedItems.Count > 0)
    8282                {
    8383                    initialPoint = e.Location;
     
    9494                    // does its thing when the mouse is moved.
    9595                    //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!
    10099                    {
    101100                        initialPoint = e.Location;
     
    123122            {
    124123                //can be a connector
    125                 if(Selection.Connector != null)
    126                 {
    127                     Selection.Connector.MoveBy(new Point(point.X - lastPoint.X, point.Y - lastPoint.Y));
     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));
    128127                    #region Do we hit something meaningful?
    129128
    130129                    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);
    134133                    if(hoveredConnector!=null)
    135134                        hoveredConnector.Hovered = true;
    136                     if(hoveredConnector != null && hoveredConnector!=Selection.Connector)
     135                    if (hoveredConnector != null && hoveredConnector != this.Controller.Model.Selection.Connector)
    137136                    {
    138137                        Controller.View.CurrentCursor = CursorPalette.Grip;
     
    145144                else //can be a selection
    146145                {
    147                     foreach(IDiagramEntity entity in Selection.SelectedItems)
     146                  foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
    148147                    {
    149148                        if (entity.AllowMove)
     
    204203                    #region Is the connector attached?
    205204                    //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);
    209208                        detach.Redo();
    210209                        package.Commands.Add(detach);
     
    216215                    //a bundle might look like overkill here but it makes the coding model uniform
    217216                    Bundle bundle = new Bundle(Controller.Model);
    218                     bundle.Entities.Add(Selection.Connector);
     217                    bundle.Entities.Add(this.Controller.Model.Selection.Connector);
    219218                    MoveCommand move = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y));
    220219                    //no Redo() necessary here!
     
    231230                            //whatever, except itself and any children of the moved connector
    232231                            //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))
    234233                                return true;
    235234                            return false;
    236235                        };
    237236                    //find it!
    238                     IConnector parentConnector = Selection.FindConnector(predicate);
     237                    IConnector parentConnector = this.Controller.Model.Selection.FindConnector(predicate);
    239238
    240239                    if(parentConnector != null) //aha, there's an attachment
    241240                    {                       
    242                         BindConnectorsCommand binder = new BindConnectorsCommand(this.Controller, parentConnector, Selection.Connector);
     241                        BindConnectorsCommand binder = new BindConnectorsCommand(this.Controller, parentConnector, this.Controller.Model.Selection.Connector);
    243242                        package.Commands.Add(binder);
    244243                        binder.Redo(); //this one is necessary since the redo cannot be performed on the whole compound command
     
    253252                    #region We are moving entities other than a connector
    254253                    Bundle bundle = new Bundle(Controller.Model);
    255                     bundle.Entities.AddRange(Selection.SelectedItems);
     254                    bundle.Entities.AddRange(this.Controller.Model.Selection.SelectedItems);
    256255                    MoveCommand cmd = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y));
    257256                    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  
    7474            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
    7575            {
    76                 if(Selection.SelectedItems.Count == 0 && Selection.Connector==null)
     76              if (this.Controller.Model.Selection.SelectedItems.Count == 0 && this.Controller.Model.Selection.Connector == null)
    7777                {
    7878                    initialPoint = e.Location;
     
    125125                if(Controller.View.Ghost != null)
    126126                {
    127                     Selection.CollectEntitiesInside(
     127                   this.Controller.Model.Selection.CollectEntitiesInside(
    128128                        Controller.View.Ghost.Rectangle);//world space
    129129
    130130                    Controller.RaiseOnShowSelectionProperties(
    131131                        new SelectionEventArgs(
    132                         Selection.SelectedItems.ToArray()));
     132                       this.Controller.Model.Selection.SelectedItems.ToArray()));
    133133                }
    134134                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  
    3535        protected override void OnActivateTool()
    3636        {
    37             if(Selection.SelectedItems!=null && Selection.SelectedItems.Count>0)
     37          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
    3838            {
    3939                /*
     
    4141               */
    4242                #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.");
    4444                //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
    4545                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
    4646                //We fetch a flattened selection, which means that if there is a group the constituents will be
    4747                //returned rather than the group itself.
    48                 foreach (IDiagramEntity entity in Selection.FlattenedSelectionItems)
     48                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
    4949                {
    5050                    //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  
    4141             * is small.
    4242             */
    43             if(Selection.SelectedItems!=null && Selection.SelectedItems.Count>0)
     43          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
    4444            {
    4545               
     
    4848                 */
    4949                #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.");               
    5151                //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
    5252                SortedList<int, IDiagramEntity> list = new SortedList<int,IDiagramEntity>();
    5353                //We fetch a flattened selection, which means that if there is a group the constituents will be
    5454                //returned rather than the group itself.
    55                 foreach(IDiagramEntity entity in Selection.FlattenedSelectionItems)
     55                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
    5656                {
    5757                    //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  
    3535        protected override void OnActivateTool()
    3636        {
    37             if(Selection.SelectedItems != null && Selection.SelectedItems.Count > 0)
     37          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
    3838            {
    3939                #region Preparation of the ordering
     
    4343
    4444                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
    45                 foreach(IDiagramEntity entity in Selection.FlattenedSelectionItems)
     45                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
    4646                {
    4747                    //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  
    3535        protected override void OnActivateTool()
    3636        {
    37             if(Selection.SelectedItems != null && Selection.SelectedItems.Count > 0)
     37          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
    3838            {
    3939                #region Preparation of the ordering
     
    4343
    4444                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
    45                 foreach(IDiagramEntity entity in Selection.FlattenedSelectionItems)
     45                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
    4646                {
    4747                    //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  
    300300            {
    301301
    302                 if (Selection.SelectedItems.Count > 0)
     302              if (this.Controller.Model.Selection.SelectedItems.Count > 0)
    303303                {                   
    304304                    UpdateState(e);
     
    331331                        //take the flat selection and keep the current state as a reference for the transformation
    332332                        //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)
    334334                        {
    335335                            if (!entity.Resizable) continue;//only take what's resizable
     
    574574                // are unaware of the resize, so we have to recalculate
    575575                // the group rectangles.
    576                 foreach (IDiagramEntity entity in Selection.SelectedItems)
     576                foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
    577577                {
    578578                    //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  
    3939           
    4040            //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)
    4242            {
    4343                MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
    4444                valid = false;               
    45             }
    46             else if (Selection.SelectedItems.Count != 1)
     45            } else if (this.Controller.Model.Selection.SelectedItems.Count != 1)
    4746            {
    4847                MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
    4948                valid = false;
    50             }
    51             else if (!(Selection.SelectedItems[0] is IGroup))
     49            } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup))
    5250            {
    5351                MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     
    5856            if (valid)
    5957            {
    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);
    6159                this.Controller.UndoManager.AddUndoCommand(cmd);
    6260                cmd.Redo();
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomToolBase.cs

    r2768 r2868  
    8080            // if there are any?  This will allow the user to zoom in on
    8181            // a selection.
    82             if (Selection.SelectedItems.Count > 0)
     82            if (this.Controller.Model.Selection.SelectedItems.Count > 0)
    8383            {
    84                 Bundle bundle = new Bundle(Selection.SelectedItems);
     84              Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
    8585                Point bundleLocation = bundle.Rectangle.Location;
    8686
Note: See TracChangeset for help on using the changeset viewer.