forked from qt-creator/qt-creator
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 <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -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 >
|
||||
|
||||
Reference in New Issue
Block a user