X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9db177273906bb393b97b4a98f6a8b4d61e8f0e3..f155075229d771430f0793700f5048ad4be00e9d:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 363cfa40f8..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 ) { @@ -4612,13 +4616,14 @@ void wxGenericListCtrl::OnScroll(wxScrollWinEvent& event) // the window the next time m_mainWin->ResetVisibleLinesRange(); - HandleOnScroll( event ); - if ( event.GetOrientation() == wxHORIZONTAL && HasHeader() ) { m_headerWin->Refresh(); m_headerWin->Update(); } + + // Let the window be scrolled as usual by the default handler. + event.Skip(); } void wxGenericListCtrl::SetSingleStyle( long style, bool add ) @@ -5396,16 +5401,6 @@ int wxGenericListCtrl::OnGetItemColumnImage(long item, long column) const return -1; } -wxListItemAttr * -wxGenericListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const -{ - wxASSERT_MSG( item >= 0 && item < GetItemCount(), - wxT("invalid item index in OnGetItemAttr()") ); - - // no attributes by default - return NULL; -} - void wxGenericListCtrl::SetItemCount(long count) { wxASSERT_MSG( IsVirtual(), wxT("this is for virtual controls only") );