simplify Enable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -285,17 +285,13 @@ void wxToggleButton::SetLabel(const wxString& label)
|
||||
|
||||
bool wxToggleButton::Enable(bool enable /*=true*/)
|
||||
{
|
||||
bool isEnabled = IsEnabled();
|
||||
|
||||
if (!wxControl::Enable(enable))
|
||||
if (!base_type::Enable(enable))
|
||||
return false;
|
||||
|
||||
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
|
||||
|
||||
if (!isEnabled && enable)
|
||||
{
|
||||
if (enable)
|
||||
GTKFixSensitivity();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user