diff --git a/interface/wx/event.h b/interface/wx/event.h index 07f56d82c8..b94413f2c1 100644 --- a/interface/wx/event.h +++ b/interface/wx/event.h @@ -463,10 +463,10 @@ public: The normal order of event table searching is as follows: -# wxApp::FilterEvent() is called. If it returns anything but @c -1 (default) the processing stops here. - -# If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled) - the function skips to step (7). -# TryBefore() is called (this is where wxValidator are taken into account for wxWindow objects). If this returns @true, the function exits. + -# If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled) + the function skips to step (7). -# Dynamic event table of the handlers bound using Bind<>() is searched. If a handler is found, it is executed and the function returns @true unless the handler used wxEvent::Skip() to indicate @@ -489,7 +489,7 @@ public: processed, ProcessEvent() on wxTheApp object is called as the last step. - Notice that steps (2)-(6) are performed in ProcessEventHere() which is + Notice that steps (3)-(5) are performed in ProcessEventHere() which is called by this function. @param event @@ -508,8 +508,7 @@ public: This method is called from ProcessEvent(), please see the detailed description of the event processing logic there. - It is @em not virtual and so may not be overridden but it does call - virtual TryBefore() which may be overridden. + It is @em not virtual and so may not be overridden. @param event Event to process. diff --git a/src/common/event.cpp b/src/common/event.cpp index 4dd9eaeaa4..5f521211c4 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1361,6 +1361,10 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event) } } + // Try the hooks which should be called before our own handlers + if ( TryBefore(event) ) + return true; + if ( ProcessEventHere(event) ) return true; @@ -1381,10 +1385,6 @@ bool wxEvtHandler::ProcessEventHere(wxEvent& event) if ( !GetEvtHandlerEnabled() ) return false; - // Try the hooks which should be called before our own handlers - if ( TryBefore(event) ) - return true; - // Handle per-instance dynamic event tables first if ( m_dynamicEvents && SearchDynamicEventTable(event) ) return true;