From 20e227dfd0bb17b15e996354162f5fa3f90646af Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 31 May 2009 13:13:07 +0000 Subject: [PATCH] don't add the sash size to the best size if the window is not actually split (see #10533) [backport of r59415 from trunk] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/splitter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index ae622018d1..ea95b29f9e 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -922,9 +922,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;