]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed hit testing for non report modes
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Jul 2001 12:10:49 +0000 (12:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Jul 2001 12:10:49 +0000 (12:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index a306732993e66b1371d900f5a374b86cae775ad2..4a94a65b79e934ed91927e7336e154c666414815 100644 (file)
@@ -2665,9 +2665,11 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
     {
         // TODO: optimize it too! this is less simple than for report view but
         //       enumerating all items is still not a way to do it!!
-        for ( current = 0; current < count && !hitResult; current++ )
+        for ( current = 0; current < count; current++ )
         {
             hitResult = HitTestLine(current, x, y);
+            if ( hitResult )
+                break;
         }
     }