diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 7d8c193d11..411595f88f 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -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;