From 34f2722515a39493ce59d22b11862b1719519ec0 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 14 Apr 2015 16:07:38 +0200 Subject: [PATCH] Timeline: Show the "preview" only when the trace duration is invalid The height of the trace is not sufficient to determine this as by hiding categories it can be reduced to 0 without the trace being empty. Change-Id: Ic8100b4da9c93808a6d49cf4ceba12de391ebc0e Task-number: QTCREATORBUG-14277 Reviewed-by: Joerg Bornemann --- src/libs/timeline/qml/MainView.qml | 2 +- src/libs/timeline/qml/TimelineLabels.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/timeline/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml index d7d168495a1..6ec83fc652f 100644 --- a/src/libs/timeline/qml/MainView.qml +++ b/src/libs/timeline/qml/MainView.qml @@ -190,7 +190,7 @@ Rectangle { ButtonsBar { id: buttonsBar - enabled: timelineModelAggregator.height > 0 + enabled: zoomControl.traceDuration > 0 anchors.top: parent.top anchors.left: parent.left width: 150 diff --git a/src/libs/timeline/qml/TimelineLabels.qml b/src/libs/timeline/qml/TimelineLabels.qml index 604658572bf..ba3f883a420 100644 --- a/src/libs/timeline/qml/TimelineLabels.qml +++ b/src/libs/timeline/qml/TimelineLabels.qml @@ -79,8 +79,8 @@ Flickable { id: loader asynchronous: y < categories.contentY + categories.height && y + height > categories.contentY - active: modelData !== null && - (modelProxy.height === 0 || (!modelData.hidden && !modelData.empty)) + active: modelData !== null && zoomer !== null && + (zoomer.traceDuration <= 0 || (!modelData.hidden && !modelData.empty)) height: active ? Math.max(modelData.height, modelData.defaultRowHeight) : 0 width: categories.width property int visualIndex: DelegateModel.itemsIndex