]> git.saurik.com Git - wxWidgets.git/commitdiff
don't add the sash size to the best size if the window is not actually split (see...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Mar 2009 15:16:48 +0000 (15:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Mar 2009 15:16:48 +0000 (15:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/splitter.cpp

index 7d8c193d11739ee08e7fc4bbaff28c43a7c80704..411595f88f25fb62e5f3c00f3c2945404cf16387 100644 (file)
@@ -924,9 +924,12 @@ wxSize wxSplitterWindow::DoGetBestSize() const
         pSash = &sizeBest.y;
     }
 
-    // account for the border and the sash
+    // account for the sash if the window is actually split
+    if ( m_windowOne && m_windowTwo )
+        *pSash += GetSashSize();
+
+    // account for the border too
     int border = 2*GetBorderSize();
-    *pSash += GetSashSize();
     sizeBest.x += border;
     sizeBest.y += border;