From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 30 Aug 2009 17:25:02 +0000 (+0000)
Subject: Use GetBestSize() rather than DoGetBestSize().
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4329eae9433dd4e7eaf8181ecc125b1f25571904

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
---

diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index 84c0e32811..217d837291 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -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;
         }