From 1d4f0ccd5c9411a38b7a4b416b50d74f68f9cbfd Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 25 May 2016 18:16:52 +0200 Subject: [PATCH] Timeline: Only load the row labels when category is expanded The row labels use up quite a lot of memory, and most of the time we don't need them. Change-Id: I25d0498311eb1fc0b3cc9abc7312baa2c1211a8d Reviewed-by: Christian Kandeler --- src/libs/timeline/qml/CategoryLabel.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/timeline/qml/CategoryLabel.qml b/src/libs/timeline/qml/CategoryLabel.qml index 226b2ef0eba..dab224082a5 100644 --- a/src/libs/timeline/qml/CategoryLabel.qml +++ b/src/libs/timeline/qml/CategoryLabel.qml @@ -34,7 +34,7 @@ Item { property QtObject notesModel property string text: model ? model.displayName : "" property bool expanded: model && model.expanded - property var labels: model ? model.labels : [] + property var labels: (expanded && model) ? model.labels : [] property bool dragging property int visualIndex @@ -96,7 +96,7 @@ Item { anchors.top: txt.bottom visible: expanded Repeater { - model: labels.length + model: expanded ? labels.length : 0 SynchronousReloader { id: loader asynchronous: dragOffset - draggerParent.contentY + y + txt.height >