]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Fix compilation in !wxUSE_MENUS case.
[wxWidgets.git] / src / generic / listctrl.cpp
index b311e031eff67ba789fe96a2a30d8b37906bce6a..caebe00001f54bc9b2008541402a5a6b0dffde32 100644 (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 )
         {