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
This commit is contained in:
parent
20338c92e8
commit
67ccee338e
|
@ -958,21 +958,14 @@ int SCH_EDIT_TOOL::RepeatDrawItem( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
m_selectionTool->AddItemToSel( newItem );
|
m_selectionTool->AddItemToSel( newItem );
|
||||||
|
|
||||||
|
// Components need to be handled by the move tool. The move tool will handle schematic
|
||||||
|
// cleanup routines
|
||||||
if( performDrag )
|
if( performDrag )
|
||||||
{
|
|
||||||
m_toolMgr->RunAction( EE_ACTIONS::move, true );
|
m_toolMgr->RunAction( EE_ACTIONS::move, true );
|
||||||
|
|
||||||
SCH_MOVE_TOOL* moveTool = m_toolMgr->GetTool<SCH_MOVE_TOOL>();
|
|
||||||
|
|
||||||
// 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();
|
newItem->ClearFlags();
|
||||||
|
|
||||||
if( newItem->IsConnectable() )
|
if( !performDrag && newItem->IsConnectable() )
|
||||||
{
|
{
|
||||||
EE_SELECTION new_sel = m_selectionTool->GetSelection();
|
EE_SELECTION new_sel = m_selectionTool->GetSelection();
|
||||||
new_sel.Add( newItem );
|
new_sel.Add( newItem );
|
||||||
|
|
Loading…
Reference in New Issue