Ensure that validators work even in presence of pushed event handlers.
Call pre-processing hooks for each of the handlers in the chain and not only the first one. This ensures that a validator (which is invoked during the pre-processing stage) of a window is used even if a window has an event handler pushed on top of it. Closes #12177. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3253,11 +3253,19 @@ protected:
|
||||
// validators.
|
||||
virtual bool TryBefore(wxEvent& event);
|
||||
|
||||
// this one is not a hook but just a helper which looks up the handler in
|
||||
// this object itself called from ProcessEventLocally() and normally
|
||||
// shouldn't be called directly as doing it would ignore any chained event
|
||||
// handlers
|
||||
bool TryHere(wxEvent& event);
|
||||
// This one is not a hook but just a helper which looks up the handler in
|
||||
// this object itself.
|
||||
//
|
||||
// It is called from ProcessEventLocally() and normally shouldn't be called
|
||||
// directly as doing it would ignore any chained event handlers
|
||||
bool TryHereOnly(wxEvent& event);
|
||||
|
||||
// Another helper which simply calls pre-processing hook and then tries to
|
||||
// handle the event at this handler level.
|
||||
bool TryBeforeAndHere(wxEvent& event)
|
||||
{
|
||||
return TryBefore(event) || TryHereOnly(event);
|
||||
}
|
||||
|
||||
// this one is called after failing to find the event handle in our own
|
||||
// table to give a chance to the other windows to process it
|
||||
|
Reference in New Issue
Block a user