From: Julian Smart Date: Fri, 5 Jan 2001 14:01:28 +0000 (+0000) Subject: Corrected horizontal rule drawing when number of items is 1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ca2869177e27d1f2d12c6bd1bc789d380c5729eb Corrected horizontal rule drawing when number of items is 1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 13afc607b6..d6fa5bda8b 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1751,13 +1751,12 @@ void wxListCtrl::OnPaint(wxPaintEvent& event) 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); - } + } + // Draw last line + if (i == (GetItemCount() - 1)) + { + cy = itemRect.GetBottom(); + dc.DrawLine(0, cy, clientSize.x, cy); } } }