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 <ogoffart@woboq.com>
This commit is contained in:
Stephen Kelly 2012-08-06 18:46:50 +02:00 committed by Qt by Nokia
parent 9a0b7348b3
commit b37849a5f5

View 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 {