From b87630999928c313d60934b65852e36e8f861696 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 18 Jun 2019 17:14:48 -0700 Subject: [PATCH] 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 --- common/tool/tool_dispatcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index cea8e15a05..f9b93206d5 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -443,8 +443,10 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_PRESSED, key | mods ); } + bool handled = false; + if( evt ) - m_toolMgr->ProcessEvent( *evt ); + handled = m_toolMgr->ProcessEvent( *evt ); // 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 @@ -467,7 +469,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // must be Skipped (sent to GUI). // Otherwise accelerators and shortcuts in main menu or toolbars are not seen. #ifndef __APPLE__ - if( type == wxEVT_CHAR && !keyIsSpecial ) + if( type == wxEVT_CHAR && !keyIsSpecial && !handled ) aEvent.Skip(); #endif }