X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd98e9354e606713ba26516dbf923ad8b338ce9..48f625bc2ce81132a2a8c2d7c524a03f1b7196e5:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index c4fc707c79..e6d1cb88e0 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -17,10 +17,6 @@ // 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