don't return wxDefaultSize from GetBestSize() under any circumstances (reverted part of 1.123.2.2 change)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-11-22 22:51:57 +00:00
parent 8a69a46a6c
commit 23c618498b

View File

@@ -574,16 +574,7 @@ wxSize wxWindowBase::DoGetBestSize() const
{
// for a generic window there is no natural best size - just use the
// current one
//return GetSize();
// Unfortunately, the above causes problems for code that expects
// BestSize to be the minimal unmangled size of the window. (eg.
// the window may grow, but BestSize will never suggest it could
// be smaller). Return instead something more indicative of the
// fact there is no reasonable answer to be given. Anything expecting
// the current size in that case should check for this and request
// it specifically.
return wxDefaultSize;
return GetSize();
}
}