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:
@@ -2021,7 +2021,7 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
{
|
{
|
||||||
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
|
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
|
||||||
{
|
{
|
||||||
size = DoGetBestSize();
|
size = GetBestSize();
|
||||||
width = size.x;
|
width = size.x;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2037,9 +2037,9 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
{
|
{
|
||||||
if ( size.x == wxDefaultCoord )
|
if ( size.x == wxDefaultCoord )
|
||||||
{
|
{
|
||||||
size = DoGetBestSize();
|
size = GetBestSize();
|
||||||
}
|
}
|
||||||
//else: already called DoGetBestSize() above
|
//else: already called GetBestSize() above
|
||||||
|
|
||||||
height = size.y;
|
height = size.y;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user