From 00a32dc1fb3c436c02f7c75573ed5fe4630fe178 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 27 Apr 2001 16:57:11 +0000 Subject: [PATCH] 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 --- src/generic/splitter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 30f6a94f25..6ff6aa9b62 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -314,7 +314,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) return; } } - + if (new_sash_position == m_sashPosition) return; @@ -698,7 +698,7 @@ void wxSplitterWindow::SizeWindows() if ( GetBorderSize() > 0 ) DrawBorders(dc); DrawSash(dc); - + SetNeedUpdating(FALSE); } @@ -727,7 +727,7 @@ bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int if ( sashPosition > 0 ) m_sashPosition = sashPosition; else if ( sashPosition < 0 ) - m_sashPosition = w - sashPosition; + m_sashPosition = w + sashPosition; // It's negative so adding is subtracting else // default m_sashPosition = w/2; @@ -750,7 +750,7 @@ bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, i if ( sashPosition > 0 ) m_sashPosition = sashPosition; else if ( sashPosition < 0 ) - m_sashPosition = h - sashPosition; + m_sashPosition = h + sashPosition; // It's negative so adding is subtracting else // default m_sashPosition = h/2; -- 2.47.2