Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3171


Ignore:
Timestamp:
03/22/10 14:05:50 (14 years ago)
Author:
mkommend
Message:

changed cursor when shapes are hovered (ticket #867)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs

    r2934 r3171  
    152152      IShape shape = shapeInfo.CreateShape();
    153153      shape.OnEntityChange += new EventHandler<EntityEventArgs>(shape_OnEntityChange);
     154      shape.OnMouseEnter += new EventHandler<EntityMouseEventArgs>(shape_OnMouseEnter);
     155      shape.OnMouseLeave += new EventHandler<EntityMouseEventArgs>(shape_OnMouseLeave);
    154156      this.shapeInfoShapeMapping.Add(shapeInfo, shape);
    155157
     
    162164      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
    163165      shape.OnEntityChange -= new EventHandler<EntityEventArgs>(shape_OnEntityChange);
     166      shape.OnMouseEnter -= new EventHandler<EntityMouseEventArgs>(shape_OnMouseEnter);
     167      shape.OnMouseLeave -= new EventHandler<EntityMouseEventArgs>(shape_OnMouseLeave);
    164168
    165169      IConnection connection;
     
    284288    }
    285289
     290    private Cursor oldCursor;
     291    private void shape_OnMouseEnter(object sender, EntityMouseEventArgs e) {
     292      this.oldCursor = this.Cursor;
     293      this.Controller.View.CurrentCursor = CursorPalette.Move;
     294    }
     295
     296    private void shape_OnMouseLeave(object sender, EntityMouseEventArgs e) {
     297      this.Controller.View.CurrentCursor = this.oldCursor;
     298      this.oldCursor = null;
     299    }
    286300
    287301    private void shape_OnEntityChange(object sender, EntityEventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.