Skip to content

Commit

Permalink
Do not check key states for non-key events in TryBefore
Browse files Browse the repository at this point in the history
  • Loading branch information
craftyjon committed Jan 14, 2022
1 parent eac1936 commit d3d2ebe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pcbnew/pcb_base_edit_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down

0 comments on commit d3d2ebe

Please sign in to comment.