From e76520fdf8e113a414603ccf2747643ef11fa4ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 7 Dec 2001 22:44:02 +0000 Subject: [PATCH 1/1] 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 --- src/generic/treectlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 2cf921e755..2ded3f6413 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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; -- 2.45.2