make SetValidator() symmetric with GetValidator() (#9793)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-03 11:12:58 +00:00
parent c1baf4b58b
commit d050da45f8

View File

@@ -1233,16 +1233,15 @@ void wxComboCtrlBase::SetValidator(const wxValidator& validator)
if ( textCtrl )
textCtrl->SetValidator( validator );
else
wxControl::SetValidator( validator );
}
wxValidator* wxComboCtrlBase::GetValidator()
{
wxTextCtrl* textCtrl = GetTextCtrl();
if ( textCtrl )
return textCtrl->GetValidator();
return wxControl::GetValidator();
return textCtrl ? textCtrl->GetValidator() : wxControl::GetValidator();
}
#endif // wxUSE_VALIDATORS