X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ee169da2b0688749a2e119099f9c7eeb23c933e..05e66a7002abbc726d3aa53fc5cb42ebaf8748e8:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b311e031ef..caebe00001 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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 ) {