]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed rendering of expanded nodes with exactly one child
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 7 Dec 2001 22:44:02 +0000 (22:44 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 7 Dec 2001 22:44:02 +0000 (22:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 2cf921e755f08fcbba4f98f462ab7cb86f595f12..2ded3f6413a09e18b60022e8a54451bbe6c6ad9b 100644 (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;