Call wxEvtHandler::TryBefore() only once from ProcessEvent().
The event pre-processing hooks associated with the window should be called only once during the event processing, we don't need to call TryBefore() for each and every event handler associated with the window too. This makes the code slightly simpler and faster and shouldn't change the behaviour of any existing code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user