have TryValidator even if wxUSE_VALIDATORS=1, so that wxBase library can be used by GUI ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1107,10 +1107,8 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
// if we have a validator, it has higher priority than our own event
|
||||
// table
|
||||
#if wxUSE_VALIDATORS
|
||||
if ( TryValidator(event) )
|
||||
return TRUE;
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
// Handle per-instance dynamic event tables first
|
||||
if ( m_dynamicEvents && SearchDynamicEventTable(event) )
|
||||
|
@@ -2152,10 +2152,9 @@ void wxWindowBase::SendDestroyEvent()
|
||||
// event processing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
|
||||
bool wxWindowBase::TryValidator(wxEvent& event)
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
// Can only use the validator of the window which
|
||||
// is receiving the event
|
||||
if ( event.GetEventObject() == this )
|
||||
@@ -2163,15 +2162,14 @@ bool wxWindowBase::TryValidator(wxEvent& event)
|
||||
wxValidator *validator = GetValidator();
|
||||
if ( validator && validator->ProcessEvent(event) )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWindowBase::TryParent(wxEvent& event)
|
||||
{
|
||||
// carry on up the parent-child hierarchy if the propgation count hasn't
|
||||
|
Reference in New Issue
Block a user