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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user