Fix a bit of fall-out from making command strings non-optional.

This commit is contained in:
Jeff Young 2022-09-20 00:07:49 +01:00
parent 4b20eb9cb0
commit 7fe3999457
1 changed files with 3 additions and 2 deletions

View File

@ -1153,8 +1153,9 @@ bool TOOL_MANAGER::processEvent( const TOOL_EVENT& aEvent )
if( GetToolHolder() && !GetToolHolder()->GetDoImmediateActions() ) if( GetToolHolder() && !GetToolHolder()->GetDoImmediateActions() )
{ {
// An tool-selection-event has no position // An tool-selection-event has no position
if( mod_event.getCommandStr() != GetToolHolder()->CurrentToolName() if( !mod_event.getCommandStr().empty()
&& !mod_event.ForceImmediate() ) && mod_event.getCommandStr() != GetToolHolder()->CurrentToolName()
&& !mod_event.ForceImmediate() )
{ {
mod_event.SetHasPosition( false ); mod_event.SetHasPosition( false );
} }