]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
corrected typo in check for icc
[wxWidgets.git] / src / common / wincmn.cpp
index c4fc707c792e94d19e34fe261cf87e60c9f507be..e6d1cb88e05a017a47776b031775d18e5da0468b 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "windowbase.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -683,11 +679,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