From 59ee332f1e11fde47e5975fcfff734611ac6d1f3 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 3 Dec 2012 17:37:54 +0000 Subject: [PATCH] Fix SashHitTest() returning true one pixel past the sash If the sash is n pixels wide, the last position over the sash is start + n - 1, not start + n git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/splitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 77b246750c..1aebd73c3e 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -491,7 +491,7 @@ bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance) int z = m_splitMode == wxSPLIT_VERTICAL ? x : y; int hitMin = m_sashPosition - tolerance; - int hitMax = m_sashPosition + GetSashSize() + tolerance; + int hitMax = m_sashPosition + GetSashSize() - 1 + tolerance; return z >= hitMin && z <= hitMax; } -- 2.47.2