]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed the drawing of the HRules so they don't try to iterate over all
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 18:48:37 +0000 (18:48 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 18:48:37 +0000 (18:48 +0000)
the zillions of items in a large (or virtual) list control

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

src/msw/listctrl.cpp

index 4f3ed90f60ab220ef8bb1acd43c82ad8df8a586a..156485d6d5cf636310e7dfb9d92548250ff93454 100644 (file)
@@ -1906,7 +1906,8 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
     int i;
     if (drawHRules)
     {
-        for (i = 0; i < itemCount; i++)
+        long top = GetTopItem();
+        for (i = top; i < top + GetCountPerPage() + 1; i++)
         {
             if (GetItemRect(i, itemRect))
             {