From 104b606ca902fb147161f3174151da8dbe32399f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 Feb 2018 15:40:18 +0100 Subject: [PATCH] Disable autopanning when starting certain tools Tools preserve their state between runs, so it could happen that activating a tool restores the state when autopanning is enabled, even though it should not be. --- pcbnew/tools/edit_tool.cpp | 1 + pcbnew/tools/point_editor.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5c5ba9e28d..67f2691ed8 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1149,6 +1149,7 @@ int EDIT_TOOL::MeasureTool( const TOOL_EVENT& aEvent ) controls.ShowCursor( true ); controls.SetSnapping( true ); + controls.SetAutoPan( false ); while( auto evt = Wait() ) { diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 06410eb184..63bca8e7d6 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -227,6 +227,7 @@ void POINT_EDITOR::Reset( RESET_REASON aReason ) { m_editPoints.reset(); m_altConstraint.reset(); + getViewControls()->SetAutoPan( false ); }