aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/qmlprofiler/qml/Label.qml
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/qmlprofiler/qml/Label.qml')
-rw-r--r--plugins/qmlprofiler/qml/Label.qml14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/qmlprofiler/qml/Label.qml b/plugins/qmlprofiler/qml/Label.qml
index 4163b9b3aca..5c0ac3ca609 100644
--- a/plugins/qmlprofiler/qml/Label.qml
+++ b/plugins/qmlprofiler/qml/Label.qml
@@ -40,17 +40,11 @@ Item {
property variant extdescriptions: []
property variant eventIds: []
+ visible: qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
+
height: root.singleRowHeight
width: 150
- visible: (!qmlProfilerModelProxy.empty) && qmlProfilerModelProxy.categoryDepth(modelIndex,categoryIndex) > 0;
- onVisibleChanged: {
- if (visible) {
- modelIndex = qmlProfilerModelProxy.modelIndexForCategory(index);
- categoryIndex = qmlProfilerModelProxy.correctedCategoryIndexForModel(modelIndex, index);
- }
- }
-
onExpandedChanged: {
qmlProfilerModelProxy.setExpanded(modelIndex, categoryIndex, expanded);
backgroundMarks.requestRedraw();
@@ -67,6 +61,10 @@ Item {
}
function getDescriptions() {
+ visible = qmlProfilerModelProxy.categoryDepth(modelIndex, categoryIndex) > 0;
+ if (!visible)
+ return;
+
var desc=[];
var ids=[];
var extdesc=[];