Commit d8768079 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Fixed cancelling dialogs in DRAWING_TOOL.

parent b6aa832f
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -251,13 +251,13 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )


        if( type == wxEVT_KEY_UP )
        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
        else
        {
        {
            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 );
                evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods );
        }
        }
    }
    }