int wxSplitterWindow::AdjustSashPosition(int sashPos) const
{
- int window_size = GetWindowSize();
-
wxWindow *win;
win = GetWindow1();
if ( minSize == -1 || m_minimumPaneSize > minSize )
minSize = m_minimumPaneSize;
- int maxSize = window_size - minSize - GetBorderSize() - GetSashSize();
- if ( sashPos > maxSize )
+ int maxSize = GetWindowSize() - minSize - GetBorderSize() - GetSashSize();
+ if ( maxSize > 0 && sashPos > maxSize )
sashPos = maxSize;
}