Fix off by 1 error in wxGenericListCtrl::HitTest().

Account for the header height if the header is present.

Closes #15063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-02-24 13:48:20 +00:00
parent 95316a3f24
commit f4f4c3aca4
2 changed files with 5 additions and 0 deletions

View File

@@ -4144,6 +4144,10 @@ long wxListMainWindow::HitTest( int x, int y, int &flags ) const
if ( InReportView() )
{
// Account for the header height if it's present.
if ( HasHeader() )
y -= GetListCtrl()->m_headerWin->GetSize().y + 1;
size_t current = y / GetLineHeight();
if ( current < count )
{