Reset tool transitions even when already active (Fixes lp:1733224)

This commit is contained in:
Jon Evans 2017-11-26 20:21:00 -05:00 committed by Maciej Suminski
parent f107545a82
commit 9e6956c9ac
1 changed files with 3 additions and 3 deletions

View File

@ -358,6 +358,9 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool )
TOOL_ID id = aTool->GetId(); TOOL_ID id = aTool->GetId();
if( aTool->GetType() == INTERACTIVE )
static_cast<TOOL_INTERACTIVE*>( aTool )->resetTransitions();
// If the tool is already active, bring it to the top of the active tools stack // If the tool is already active, bring it to the top of the active tools stack
if( isActive( aTool ) ) if( isActive( aTool ) )
{ {
@ -368,9 +371,6 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool )
aTool->Reset( TOOL_INTERACTIVE::RUN ); aTool->Reset( TOOL_INTERACTIVE::RUN );
if( aTool->GetType() == INTERACTIVE )
static_cast<TOOL_INTERACTIVE*>( aTool )->resetTransitions();
// Add the tool on the front of the processing queue (it gets events first) // Add the tool on the front of the processing queue (it gets events first)
m_activeTools.push_front( id ); m_activeTools.push_front( id );