From 9d241ba812015aa73a59996ec36d609c285b23ab Mon Sep 17 00:00:00 2001 From: Ronnie Gaensli Date: Mon, 6 Aug 2018 10:15:58 +0200 Subject: [PATCH] Cancel Add dimension leaves auto panning on Fixes: lp:178551 * https://bugs.launchpad.net/kicad/+bug/178551 (cherry picked from commit 3ca84dca) --- pcbnew/tools/drawing_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 115485adbb..e2d07699fc 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -524,6 +524,8 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent ) if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) ) { + m_controls->SetAutoPan( false ); + if( step != SET_ORIGIN ) // start from the beginning { preview.Clear(); @@ -666,6 +668,8 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent ) if( step != SET_ORIGIN ) delete dimension; + m_controls->SetAutoPan( false ); + m_view->Remove( &preview ); frame()->SetMsgPanel( board() ); m_frame->SetNoToolSelected();