Cancel Add dimension leaves auto panning on

Fixes: lp:178551
* https://bugs.launchpad.net/kicad/+bug/178551

(cherry picked from commit 3ca84dca)
This commit is contained in:
Ronnie Gaensli 2018-08-06 10:15:58 +02:00 committed by Maciej Suminski
parent 57c3e98f8c
commit 9d241ba812
1 changed files with 4 additions and 0 deletions

View File

@ -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();