]> git.saurik.com Git - wxWidgets.git/commitdiff
fix handling of partially-specified min size
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Aug 2005 11:14:20 +0000 (11:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Aug 2005 11:14:20 +0000 (11:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index c4fc707c792e94d19e34fe261cf87e60c9f507be..e09ed57c34aa9356683440eccfa81e7de19aed85 100644 (file)
@@ -683,11 +683,15 @@ wxSize wxWindowBase::DoGetBestSize() const
         // then, when the containing window is shrunk back (because our initial
         // best size had been used for computing the parent min size), we can't
         // be shrunk back any more because our best size is now bigger
-        if ( !GetMinSize().IsFullySpecified() )
-            wxConstCast(this, wxWindowBase)->SetMinSize(GetSize());
+        wxSize size = GetMinSize();
+        if ( !size.IsFullySpecified() )
+        {
+            size.SetDefaults(GetSize());
+            wxConstCast(this, wxWindowBase)->SetMinSize(size);
+        }
 
         // return as-is, unadjusted by the client size difference.
-        return GetMinSize();
+        return size;
     }
 
     // Add any difference between size and client size