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
This commit is contained in:
Robin Dunn
2004-04-15 23:21:35 +00:00
parent 844ca09641
commit 997c728048

View File

@@ -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();
}
}