fixed (rare but fatal) bug in wxWindowDisabler
[wxWidgets.git] / src / gtk / spinctrl.cpp
index 9e51422831dd85d04c741b0666d345ea896a85e9..d5efca072e8da36ac9a2dad5d5231db6b127ee6f 100644 (file)
@@ -97,8 +97,6 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
 
     PostCreation();
 
-    ApplyWidgetStyle();
-
     SetFont( parent->GetFont() );
     
     wxSize size_best( DoGetBestSize() );
@@ -107,6 +105,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
         new_size.x = size_best.x;
     if (new_size.y == -1)
         new_size.y = size_best.y;
+    if (new_size.y > size_best.y)
+        new_size.y = size_best.y;
     if ((new_size.x != size.x) || (new_size.y != size.y))
         SetSize( new_size.x, new_size.y );