don't allow negative splitter position
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -578,8 +578,6 @@ int wxSplitterWindow::GetWindowSize() const
|
||||
|
||||
int wxSplitterWindow::AdjustSashPosition(int sashPos) const
|
||||
{
|
||||
int window_size = GetWindowSize();
|
||||
|
||||
wxWindow *win;
|
||||
|
||||
win = GetWindow1();
|
||||
@@ -608,8 +606,8 @@ int wxSplitterWindow::AdjustSashPosition(int sashPos) const
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user