X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cdfd5e01663ff0febc9630ac4cfa317841b4fb26..43c5b6e808f083617eb42cb48e77366844f8fb5c:/src/generic/splitter.cpp?ds=sidebyside 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;