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
This commit is contained in:
Václav Slavík
2004-10-06 21:49:40 +00:00
parent 2619179042
commit f3d618fdde

View File

@@ -2043,12 +2043,16 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
if ( event.GetText() != control->GetLabel() ) if ( event.GetText() != control->GetLabel() )
control->SetLabel(event.GetText()); control->SetLabel(event.GetText());
} }
}
#endif // wxUSE_CONTROLS
if ( event.GetSetChecked() )
{
#if wxUSE_CHECKBOX #if wxUSE_CHECKBOX
wxCheckBox *checkbox = wxDynamicCastThis(wxCheckBox); wxCheckBox *checkbox = wxDynamicCastThis(wxCheckBox);
if ( checkbox ) if ( checkbox )
{ {
if ( event.GetSetChecked() ) checkbox->SetValue(event.GetChecked());
checkbox->SetValue(event.GetChecked());
} }
#endif // wxUSE_CHECKBOX #endif // wxUSE_CHECKBOX
@@ -2056,12 +2060,10 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
wxRadioButton *radiobtn = wxDynamicCastThis(wxRadioButton); wxRadioButton *radiobtn = wxDynamicCastThis(wxRadioButton);
if ( radiobtn ) if ( radiobtn )
{ {
if ( event.GetSetChecked() ) radiobtn->SetValue(event.GetChecked());
radiobtn->SetValue(event.GetChecked());
} }
#endif // wxUSE_RADIOBTN #endif // wxUSE_RADIOBTN
} }
#endif
} }
#if 0 #if 0