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