fixed rendering of expanded nodes with exactly one child

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-12-07 22:44:02 +00:00
parent 3678697093
commit e76520fdf8

View File

@@ -1897,7 +1897,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
PaintLevel(children[n], dc, 1, y);
} while (++n < count);
if (!HasFlag(wxTR_NO_LINES) && HasFlag(wxTR_LINES_AT_ROOT) && count > 1)
if (!HasFlag(wxTR_NO_LINES) && HasFlag(wxTR_LINES_AT_ROOT) && count > 0)
{
// draw line down to last child
origY += GetLineHeight(children[0])>>1;
@@ -2059,7 +2059,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
PaintLevel(children[n], dc, level, y);
} while (++n < count);
if (!HasFlag(wxTR_NO_LINES) && count > 1)
if (!HasFlag(wxTR_NO_LINES) && count > 0)
{
// draw line down to last child
oldY += GetLineHeight(children[n-1])>>1;