tool_dispatcher.cpp: fix incorrect handling of ESC key on Linux and Windows.
m_toolMgr->ProcessEvent() returns false when a ESC key is handled. It should return true. So we force the handled flag to true for a ESC key event to avoid skipping this event. Otherwise the ESC key event is handled twice.
This commit is contained in:
parent
269cd11b5a
commit
1633068920
|
@ -462,8 +462,14 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
bool handled = false;
|
||||
|
||||
if( evt )
|
||||
{
|
||||
handled = m_toolMgr->ProcessEvent( *evt );
|
||||
|
||||
// ESC is the special key for canceling tools, and is therefore seen as handled
|
||||
if( key == WXK_ESCAPE )
|
||||
handled = true;
|
||||
}
|
||||
|
||||
// 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
|
||||
// and wxEVT_LEFT_DOWN must be always Skipped.
|
||||
|
|
Loading…
Reference in New Issue