Fixed cancelling dialogs in DRAWING_TOOL.

This commit is contained in:
Maciej Suminski 2014-04-03 09:48:06 +02:00
parent b6aa832f83
commit d876807966
1 changed files with 5 additions and 5 deletions

View File

@ -251,14 +251,14 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
if( type == wxEVT_KEY_UP )
{
if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools
evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL );
else
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods );
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods );
}
else
{
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods );
if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools
evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL );
else
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods );
}
}