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
This commit is contained in:
@@ -491,7 +491,7 @@ bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance)
|
|||||||
|
|
||||||
int z = m_splitMode == wxSPLIT_VERTICAL ? x : y;
|
int z = m_splitMode == wxSPLIT_VERTICAL ? x : y;
|
||||||
int hitMin = m_sashPosition - tolerance;
|
int hitMin = m_sashPosition - tolerance;
|
||||||
int hitMax = m_sashPosition + GetSashSize() + tolerance;
|
int hitMax = m_sashPosition + GetSashSize() - 1 + tolerance;
|
||||||
|
|
||||||
return z >= hitMin && z <= hitMax;
|
return z >= hitMin && z <= hitMax;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user