diff --git a/common/tool/action_menu.cpp b/common/tool/action_menu.cpp index 47ce110097..e97cf9f5b2 100644 --- a/common/tool/action_menu.cpp +++ b/common/tool/action_menu.cpp @@ -404,19 +404,19 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent ) keyEvent.m_shiftDown = ( acceleratorKey->GetFlags() & wxMOD_SHIFT ) > 0; keyEvent.m_altDown = ( acceleratorKey->GetFlags() & wxMOD_ALT ) > 0; - if( dynamic_cast( focus ) ) - focus->HandleWindowEvent( keyEvent ); - else if( dynamic_cast( focus ) ) + if( dynamic_cast( focus ) ) TEXTENTRY_TRICKS::OnCharHook( dynamic_cast( focus ), keyEvent ); + else + focus->HandleWindowEvent( keyEvent ); if( keyEvent.GetSkipped() ) { keyEvent.SetEventType( wxEVT_CHAR ); focus->HandleWindowEvent( keyEvent ); } - } - return; + return; + } } // Store the selected position, so it can be checked by the tools