Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8860


Ignore:
Timestamp:
10/30/12 12:54:50 (11 years ago)
Author:
jkarder
Message:

#1747: fixed panning with the middle mouse button

File:
1 edited

Legend:

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

    r8000 r8860  
    154154
    155155    void ParentControl_MouseDown(object sender, MouseEventArgs e) {
    156       lastActiveTool = this.graphVisualizationInfoView.Controller.ActiveTool;
    157156      if (e.Button == MouseButtons.Middle) {
    158         if (!(lastActiveTool is CustomPanTool)) this.graphVisualizationInfoView.Controller.ActivateTool(CustomPanTool.ToolName);
     157        lastActiveTool = graphVisualizationInfoView.Controller.ActiveTool;
     158        graphVisualizationInfoView.Controller.ActivateTool(CustomPanTool.ToolName);
    159159      }
    160160    }
     
    162162    void ParentControl_MouseUp(object sender, MouseEventArgs e) {
    163163      if (e.Button == MouseButtons.Middle) {
    164         if (lastActiveTool != null) this.graphVisualizationInfoView.Controller.ActivateTool(lastActiveTool.Name);
    165         else this.graphVisualizationInfoView.Controller.DeactivateAllTools();
     164        var activeTool = graphVisualizationInfoView.Controller.ActiveTool;
     165        graphVisualizationInfoView.Controller.DeactivateTool(activeTool);
     166        if (lastActiveTool != null && !(lastActiveTool is ZoomToolBase))
     167          graphVisualizationInfoView.Controller.ActivateTool(lastActiveTool.Name);
    166168      }
    167169    }
Note: See TracChangeset for help on using the changeset viewer.