From 997c728048635b416eec7360ba809251dedb14a4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 15 Apr 2004 23:21:35 +0000 Subject: [PATCH] If the window has a minsize then use that as the BestSize if there is no sizer, contstraints, or children, otherwise use current size as before. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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(); } } -- 2.45.2