From 7efca0113d2cbdf665c96a478043c993873611bd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 22 Jun 2021 12:52:40 +0100 Subject: [PATCH] Reset m_inDrawingTool on exit. Fixes https://gitlab.com/kicad/code/kicad/issues/8653 --- pcbnew/tools/drawing_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 5ae65d2451..e9989908d1 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1143,12 +1143,16 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) std::list>& list = dlg.GetImportedItems(); if( dlgResult != wxID_OK ) + { + m_inDrawingTool = false; return 0; + } // Ensure the list is not empty: if( list.empty() ) { - wxMessageBox( _( "No graphic items found in file to import") ); + wxMessageBox( _( "No graphic items found in file.") ); + m_inDrawingTool = false; return 0; }