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
This commit is contained in:
Julian Smart
2001-01-05 14:01:28 +00:00
parent 8036af01d8
commit ca2869177e

View File

@@ -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);
}
}
}