Clear toolstack after cancel.
Fixes https://gitlab.com/kicad/code/kicad/issues/5336
This commit is contained in:
parent
d5878e552d
commit
a4ff339a1e
|
@ -96,6 +96,13 @@ void TOOLS_HOLDER::PopTool( const std::string& actionName )
|
|||
}
|
||||
|
||||
|
||||
void TOOLS_HOLDER::ClearToolStack()
|
||||
{
|
||||
m_toolStack.clear();
|
||||
DisplayToolMsg( ACTIONS::selectionTool.GetLabel() );
|
||||
}
|
||||
|
||||
|
||||
std::string TOOLS_HOLDER::CurrentToolName() const
|
||||
{
|
||||
if( m_toolStack.empty() )
|
||||
|
|
|
@ -114,6 +114,8 @@ public:
|
|||
virtual void PushTool( const std::string& actionName );
|
||||
virtual void PopTool( const std::string& actionName );
|
||||
|
||||
void ClearToolStack();
|
||||
|
||||
bool ToolStackIsEmpty() { return m_toolStack.empty(); }
|
||||
|
||||
std::string CurrentToolName() const;
|
||||
|
|
|
@ -381,7 +381,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference )
|
|||
if( unselect )
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
|
||||
|
||||
editFrame->PopTool( tool );
|
||||
editFrame->ClearToolStack();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue