From f3d618fdded256a3238a6b338b206444a0f329de Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 6 Oct 2004 21:49:40 +0000 Subject: [PATCH] fixed broken DoUpdateWindowUI: event.SetChecked doesn't have to be used together with SetText git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 06e6e6f274..784b618111 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2043,12 +2043,16 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) if ( event.GetText() != control->GetLabel() ) control->SetLabel(event.GetText()); } + } +#endif // wxUSE_CONTROLS + + if ( event.GetSetChecked() ) + { #if wxUSE_CHECKBOX wxCheckBox *checkbox = wxDynamicCastThis(wxCheckBox); if ( checkbox ) { - if ( event.GetSetChecked() ) - checkbox->SetValue(event.GetChecked()); + checkbox->SetValue(event.GetChecked()); } #endif // wxUSE_CHECKBOX @@ -2056,12 +2060,10 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) wxRadioButton *radiobtn = wxDynamicCastThis(wxRadioButton); if ( radiobtn ) { - if ( event.GetSetChecked() ) - radiobtn->SetValue(event.GetChecked()); + radiobtn->SetValue(event.GetChecked()); } #endif // wxUSE_RADIOBTN } -#endif } #if 0 -- 2.50.0