From 359cf384de6cf0253b7f9b1ff1614bf260cac19a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 29 Aug 2019 23:02:51 +0100 Subject: [PATCH] Import graphics is a one-shot, not a tool. Fixes: lp:1841975 * https://bugs.launchpad.net/kicad/+bug/1841975 --- pcbnew/tools/drawing_tool.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index d30c58f73e..128e9e8213 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -769,8 +769,6 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) if( evt->IsCancelInteractive() || evt->IsActivate() ) { preview.FreeItems(); - - m_frame->PopTool( tool ); break; } else if( evt->IsMotion() ) @@ -816,7 +814,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) commit.Add( item ); commit.Push( _( "Place a DXF_SVG drawing" ) ); - break; + break; // This is a one-shot command, not a tool } else evt->SetPassEvent(); @@ -824,6 +822,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) preview.Clear(); m_view->Remove( &preview ); + m_frame->PopTool( tool ); return 0; }