From 6443de026310552cacd68a6d0318e73d14929680 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 14 Aug 2001 18:48:37 +0000 Subject: [PATCH] Fixed the drawing of the HRules so they don't try to iterate over all 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 4f3ed90f60..156485d6d5 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -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)) { -- 2.50.0