projects
/
sdk
/
tools
/
heaptrack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d18c09
)
Don't descend into children of invisible flamegraph items.
author
Milian Wolff
<mail@milianw.de>
Tue, 9 Feb 2016 20:17:48 +0000
(21:17 +0100)
committer
Milian Wolff
<mail@milianw.de>
Tue, 9 Feb 2016 20:17:48 +0000
(21:17 +0100)
gui/flamegraph.cpp
patch
|
blob
|
history
diff --git
a/gui/flamegraph.cpp
b/gui/flamegraph.cpp
index
d47a789
..
8d743a2
100644
(file)
--- a/
gui/flamegraph.cpp
+++ b/
gui/flamegraph.cpp
@@
-176,9
+176,11
@@
void layoutItems(FrameGraphicsItem *parent)
auto frameChild = static_cast<FrameGraphicsItem*>(child);
const qreal w = maxWidth * double(frameChild->cost()) / parent->cost();
frameChild->setVisible(w > 1);
- frameChild->setRect(QRectF(x, y, w, h));
- layoutItems(frameChild);
- x += w;
+ if (frameChild->isVisible()) {
+ frameChild->setRect(QRectF(x, y, w, h));
+ layoutItems(frameChild);
+ x += w;
+ }
}
}