From 67ccee338eb11a799de63f573a99dc1fc3751a5d Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 10 Feb 2021 09:58:28 -0800 Subject: [PATCH] Give cleanup to the move tool For unknown reasons, the move tool was not clearing the stack when called from the edit tool. This moves the call to move tool to after clearing the edit tool from the stack. The move tool handles cleanup, so we skip the original reason for waiting on the move tool before finalizing the edit tool routines Fixes https://gitlab.com/kicad/code/kicad/issues/7481 --- eeschema/tools/sch_edit_tool.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index b2f9661735..9990cc615c 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -958,21 +958,14 @@ int SCH_EDIT_TOOL::RepeatDrawItem( const TOOL_EVENT& aEvent ) m_selectionTool->AddItemToSel( newItem ); + // Components need to be handled by the move tool. The move tool will handle schematic + // cleanup routines if( performDrag ) - { m_toolMgr->RunAction( EE_ACTIONS::move, true ); - SCH_MOVE_TOOL* moveTool = m_toolMgr->GetTool(); - - // We cannot proceed until the move tool has ended (by placement or cancel) otherwise, - // we risk breaking out of the tool by activating another - while( moveTool->IsToolActive() ) - Wait(); - } - newItem->ClearFlags(); - if( newItem->IsConnectable() ) + if( !performDrag && newItem->IsConnectable() ) { EE_SELECTION new_sel = m_selectionTool->GetSelection(); new_sel.Add( newItem );