Fix key accel overriding menus and dialogs.

All keys were being captured before being processed by any window of the
app to check for accelerators. This meant being impossible to use any
keys for input if they were saved for an accel.

- Fix #516.
This commit is contained in:
Edênis Freindorfer Azevedo 2019-10-05 15:31:54 -03:00 committed by Rafael Kitover
parent 6468d04114
commit 384f448757
1 changed files with 1 additions and 1 deletions

View File

@ -821,7 +821,7 @@ void MainFrame::OnSize(wxSizeEvent& event)
int MainFrame::FilterEvent(wxEvent& event)
{
if (event.GetEventType() == wxEVT_KEY_DOWN)
if (event.GetEventType() == wxEVT_KEY_DOWN && !menus_opened && !dialog_opened)
{
wxKeyEvent& ke = (wxKeyEvent&)event;
int keyCode = ke.GetKeyCode();