X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ebfafde515e58d4a6f9fda5290a5620ebc1637f..4997d3014cd76b41f2d4036dfd168ad886972f35:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 0c419c0476..6b6b35ab28 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -589,11 +589,14 @@ wxSize wxWindowBase::DoGetBestSize() const return wxSize(maxX, maxY); } - else // has children + else // ! has children { - // for a generic window there is no natural best size - just use the - // current size - return GetSize(); + // for a generic window there is no natural best size - just use either the + // minimum size if there is one, or the current size + if ( GetMinSize().IsFullySpecified() ) + return GetMinSize(); + else + return GetSize(); } }