From: Vadim Zeitlin Date: Sun, 3 Aug 2008 11:12:58 +0000 (+0000) Subject: make SetValidator() symmetric with GetValidator() (#9793) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d050da45f8d91301892d73905b292ef25675217d make SetValidator() symmetric with GetValidator() (#9793) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 6ed975c8a8..3d3bb90ad1 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -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