Use GetBestSize() rather than DoGetBestSize().

Call GetBestSize() from wxWindowMSW::DoSetSize() so that it works correctly
for the classes which only override DoGetBestClientSize() and not
DoGetBestSize() itself, such as wxStaticText.

Closes #11096.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-30 17:25:02 +00:00
parent d301c44093
commit 4329eae943

View File

@@ -2021,7 +2021,7 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
{
size = DoGetBestSize();
size = GetBestSize();
width = size.x;
}
else
@@ -2037,9 +2037,9 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
if ( size.x == wxDefaultCoord )
{
size = DoGetBestSize();
size = GetBestSize();
}
//else: already called DoGetBestSize() above
//else: already called GetBestSize() above
height = size.y;
}