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 ) if ( textCtrl )
textCtrl->SetValidator( validator ); textCtrl->SetValidator( validator );
else
wxControl::SetValidator( validator );
} }
wxValidator* wxComboCtrlBase::GetValidator() wxValidator* wxComboCtrlBase::GetValidator()
{ {
wxTextCtrl* textCtrl = GetTextCtrl(); wxTextCtrl* textCtrl = GetTextCtrl();
if ( textCtrl ) return textCtrl ? textCtrl->GetValidator() : wxControl::GetValidator();
return textCtrl->GetValidator();
return wxControl::GetValidator();
} }
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS