]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/button.cpp
the handling of Home/End in wxScrollBar was reversed -- fixed now
[wxWidgets.git] / src / os2 / button.cpp
index 1a7ab387c0957382b2e3b910e94516fd82189943..46892a89fc769fe17608a0786b09bb0775a2b23b 100644 (file)
@@ -162,13 +162,19 @@ wxSize wxButton::DoGetBestSize() const
     //
     nHeightButton += nHeightChar/1.5;
 
-    wxSize                          vSize = GetDefaultSize();
+    if (!HasFlag(wxBU_EXACTFIT))
+    {
+        wxSize                      vSize = GetDefaultSize();
 
-    if (nWidthButton > vSize.x)
-        vSize.x = nWidthButton;
-    if (nHeightButton > vSize.y)
-        vSize.y = nHeightButton;
-    return vSize;
+        if (nWidthButton > vSize.x)
+            vSize.x = nWidthButton;
+        if (nHeightButton > vSize.y)
+            vSize.y = nHeightButton;
+        return vSize;
+    }
+    return wxSize( nWidthButton
+                  ,nHeightButton
+                 );
 } // end of wxButton::DoGetBestSize
 
 /* static */