]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxGenericListCtrl scrolling by not processing the events twice.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Nov 2012 23:18:20 +0000 (23:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Nov 2012 23:18:20 +0000 (23:18 +0000)
Scrolling wxGenericListCtrl was broken since r72939 because its OnScroll()
event handler explicitly called wxScrollHelper::HandleOnScroll() which was
also called by the base class ProcessEvent().

Arguably, wxScrollHelper::ProcessEvent() should be updated to allow handling
events directly like this by not processing it again if the event wasn't
skipped but for now just do skip the event and let the default handling take
place which at least makes wxGenericListCtrl work correctly again.

Closes #14852.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 363cfa40f88f94734dd927760f0b0838b5d14dde..03e299d46aa144595b4401ff261997a74fe03467 100644 (file)
@@ -4612,13 +4612,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 )