Stop clearing tool transitions when running tools

There doesn't seem to be a need to actually clear transitions for the
tools when running a handler. This clearing also prevents running
another nested handler from the same tool.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16449
This commit is contained in:
Ian McInerney 2023-12-29 00:36:11 +00:00
parent b6fffb3923
commit 5a5b7e0064
1 changed files with 0 additions and 9 deletions

View File

@ -821,9 +821,6 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( std::move( func_copy ) );
// as the state changes, the transition table has to be set up again
st->transitions.clear();
wxLogTrace( kicadTraceToolStack,
wxS( "TOOL_MANAGER::dispatchInternal - Running tool %s for event: %s" ),
st->theTool->GetName(), aEvent.Format() );
@ -1002,12 +999,6 @@ TOOL_MANAGER::ID_LIST::iterator TOOL_MANAGER::finishTool( TOOL_STATE* aState )
if( aState == m_activeState )
setActiveState( nullptr );
// Set transitions to be ready for future TOOL_EVENTs
TOOL_BASE* tool = aState->theTool;
if( tool->GetType() == INTERACTIVE )
static_cast<TOOL_INTERACTIVE*>( tool )->resetTransitions();
return it;
}