Don't skip handled events in GTK

Now that our tool framework handles the hotkeys, we need to skip the
passed handling work-around for actions that are already handled in the
event.

Fixes: lp:1832604
* https://bugs.launchpad.net/kicad/+bug/1832604

(cherry picked from commit b876309999)

Fixes: lp:1819210
* https://bugs.launchpad.net/kicad/+bug/1819210
This commit is contained in:
Seth Hillbrand 2019-06-18 17:14:48 -07:00
parent 697234dd51
commit b124599de3
1 changed files with 4 additions and 2 deletions

View File

@ -442,8 +442,10 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_PRESSED, key | mods ); evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_PRESSED, key | mods );
} }
bool handled = false;
if( evt ) if( evt )
m_toolMgr->ProcessEvent( *evt ); handled = m_toolMgr->ProcessEvent( *evt );
// pass the event to the GUI, it might still be interested in it // pass the event to the GUI, it might still be interested in it
// Note wxEVT_CHAR_HOOK event is already skipped for special keys not used by KiCad // Note wxEVT_CHAR_HOOK event is already skipped for special keys not used by KiCad
@ -466,7 +468,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
// must be Skipped (sent to GUI). // must be Skipped (sent to GUI).
// Otherwise accelerators and shortcuts in main menu or toolbars are not seen. // Otherwise accelerators and shortcuts in main menu or toolbars are not seen.
#ifndef __APPLE__ #ifndef __APPLE__
if( type == wxEVT_CHAR && !keyIsSpecial ) if( type == wxEVT_CHAR && !keyIsSpecial && !handled )
aEvent.Skip(); aEvent.Skip();
#endif #endif