Do not draw garbage branches if 0px indentation is specified.
authorStephen Kelly <stephen.kelly@kdab.com>
Mon, 6 Aug 2012 16:46:50 +0000 (18:46 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 7 Aug 2012 09:15:55 +0000 (11:15 +0200)
This can't realisitically be unit tested.

Task-number: QTBUG-26305

Change-Id: If7f56c44c472ff0ffbda4744b76ed2119bb64bf8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/widgets/itemviews/qtreeview.cpp

index 41f7543..36a2c7e 100644 (file)
@@ -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 {