Do not check key states for non-key events in TryBefore

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10127

(cherry picked from commit 2306d00c89)
This commit is contained in:
Jon Evans 2022-01-13 22:28:45 -05:00
parent eac1936303
commit d3d2ebe349
1 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,9 @@ bool PCB_BASE_EDIT_FRAME::TryBefore( wxEvent& aEvent )
wxKeyCode viewSwitchKey = WXK_WINDOWS_LEFT;
#endif
if( aEvent.GetEventType() != wxEVT_CHAR && aEvent.GetEventType() != wxEVT_CHAR_HOOK )
return PCB_BASE_FRAME::TryBefore( aEvent );
if( !s_presetSwitcherShown && wxGetKeyState( presetSwitchKey ) && wxGetKeyState( WXK_TAB ) )
{
if( m_appearancePanel && this->IsActive() )