]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/button.cpp
clang fix, fixes #12332
[wxWidgets.git] / src / gtk / button.cpp
index 2ce3e1d0a1460bec6ead071c4d8cc4223ce4e520..19c8d2521b406395d3b4d74040ff766b92a4547c 100644 (file)
@@ -105,8 +105,6 @@ wxgtk_button_style_set_callback(GtkWidget* widget, GtkStyle*, wxButton* win)
 // wxButton
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxButton,wxControl)
-
 bool wxButton::Create(wxWindow *parent,
                       wxWindowID id,
                       const wxString &label,
@@ -266,17 +264,13 @@ void wxButton::SetLabel( const wxString &lbl )
 
 bool wxButton::Enable( bool enable )
 {
-    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();
-    }
 
     GTKUpdateBitmap();
 
@@ -668,6 +662,7 @@ void wxButton::DoSetBitmapPosition(wxDirection dir)
         }
 
         gtk_button_set_image_position(GTK_BUTTON(m_widget), gtkpos);
+        InvalidateBestSize();
     }
 #endif // GTK+ 2.10+
 }