From 34ea6529c9be211b30a882ff25d4ade3a4ad96b4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 12 Apr 2021 11:39:02 +0100 Subject: [PATCH] Account for rootIsDecorated when painting tree lines in RDTreeView --- qrenderdoc/Widgets/Extended/RDTreeView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/Widgets/Extended/RDTreeView.cpp b/qrenderdoc/Widgets/Extended/RDTreeView.cpp index d8d50943e..13819df9e 100644 --- a/qrenderdoc/Widgets/Extended/RDTreeView.cpp +++ b/qrenderdoc/Widgets/Extended/RDTreeView.cpp @@ -569,7 +569,8 @@ void RDTreeView::drawBranches(QPainter *painter, const QRect &rect, const QModel // fill in the background behind the lines for the whole row, since by default it doesn't show up // behind the tree lines. - QRect allLinesRect(rect.left(), rect.top(), (parents.count() + 1) * indentation(), rect.height()); + QRect allLinesRect(rect.left(), rect.top(), + (parents.count() + (rootIsDecorated() ? 1 : 0)) * indentation(), rect.height()); QStyleOptionViewItem opt; opt.initFrom(this);