Tracing: Don't call selectClicked() after changing the root

The selectedNode and hoveredNode are invalid at that point. Rather,
reset them before changing the root. As the whole tree is rebuilt, the
isSelected condition will be re-evaluated for each node, and the right
one will be selected anyway.

Change-Id: Id641accfae4f4e240740219013ad5f81e04dd054
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-03 13:50:19 +02:00
parent 22e523e504
commit 3a379e5d1f

View File

@@ -242,8 +242,9 @@ ScrollView {
onClicked: selectClicked()
onDoubleClicked: {
tooltip.selectedNode = null;
tooltip.hoveredNode = null;
flamegraph.root = FlameGraph.modelIndex;
selectClicked();
}
// Functions, not properties to limit the initial overhead when creating the nodes,