]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed a bug so wxLC_VRULES works by itself.
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 18:34:18 +0000 (18:34 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 18:34:18 +0000 (18:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 68cd5354900cfeef5af520f24562dc3665811c44..4f3ed90f60ab220ef8bb1acd43c82ad8df8a586a 100644 (file)
@@ -1904,20 +1904,23 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
 
     int itemCount = GetItemCount();
     int i;
-    for (i = 0; i < itemCount; i++)
+    if (drawHRules)
     {
-        if (GetItemRect(i, itemRect))
+        for (i = 0; i < itemCount; i++)
         {
-            cy = itemRect.GetTop();
-            if (i != 0) // Don't draw the first one
-            {
-                dc.DrawLine(0, cy, clientSize.x, cy);
-            }
-            // Draw last line
-            if (i == (GetItemCount() - 1))
+            if (GetItemRect(i, itemRect))
             {
-                cy = itemRect.GetBottom();
-                dc.DrawLine(0, cy, clientSize.x, cy);
+                cy = itemRect.GetTop();
+                if (i != 0) // Don't draw the first one
+                {
+                    dc.DrawLine(0, cy, clientSize.x, cy);
+                }
+                // Draw last line
+                if (i == (GetItemCount() - 1))
+                {
+                    cy = itemRect.GetBottom();
+                    dc.DrawLine(0, cy, clientSize.x, cy);
+                }
             }
         }
     }