Made wxSplitterWindow conform to the docs with respect to using a

negative sash position in the Split* methods.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-04-27 16:57:11 +00:00
parent 29f45f85e9
commit 00a32dc1fb

View File

@@ -314,7 +314,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
return; return;
} }
} }
if (new_sash_position == m_sashPosition) if (new_sash_position == m_sashPosition)
return; return;
@@ -698,7 +698,7 @@ void wxSplitterWindow::SizeWindows()
if ( GetBorderSize() > 0 ) if ( GetBorderSize() > 0 )
DrawBorders(dc); DrawBorders(dc);
DrawSash(dc); DrawSash(dc);
SetNeedUpdating(FALSE); SetNeedUpdating(FALSE);
} }
@@ -727,7 +727,7 @@ bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int
if ( sashPosition > 0 ) if ( sashPosition > 0 )
m_sashPosition = sashPosition; m_sashPosition = sashPosition;
else if ( sashPosition < 0 ) else if ( sashPosition < 0 )
m_sashPosition = w - sashPosition; m_sashPosition = w + sashPosition; // It's negative so adding is subtracting
else // default else // default
m_sashPosition = w/2; m_sashPosition = w/2;
@@ -750,7 +750,7 @@ bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, i
if ( sashPosition > 0 ) if ( sashPosition > 0 )
m_sashPosition = sashPosition; m_sashPosition = sashPosition;
else if ( sashPosition < 0 ) else if ( sashPosition < 0 )
m_sashPosition = h - sashPosition; m_sashPosition = h + sashPosition; // It's negative so adding is subtracting
else // default else // default
m_sashPosition = h/2; m_sashPosition = h/2;