From b37849a5f54d7d3e66adb4430daa2cbd7b366f13 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 6 Aug 2012 18:46:50 +0200 Subject: [PATCH] Do not draw garbage branches if 0px indentation is specified. This can't realisitically be unit tested. Task-number: QTBUG-26305 Change-Id: If7f56c44c472ff0ffbda4744b76ed2119bb64bf8 Reviewed-by: Olivier Goffart --- src/widgets/itemviews/qtreeview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 41f7543..36a2c7e 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -1680,7 +1680,8 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option, style()->drawPrimitive(QStyle::PE_PanelItemViewRow, &opt, painter, this); opt.state = oldState; - drawBranches(painter, branches, index); + if (d->indent != 0) + drawBranches(painter, branches, index); if (setClipRect) painter->restore(); } else { -- 2.7.4