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 <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-04-14 16:07:38 +02:00
parent e11965b3aa
commit 34f2722515
2 changed files with 3 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ Rectangle {
ButtonsBar { ButtonsBar {
id: buttonsBar id: buttonsBar
enabled: timelineModelAggregator.height > 0 enabled: zoomControl.traceDuration > 0
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
width: 150 width: 150

View File

@@ -79,8 +79,8 @@ Flickable {
id: loader id: loader
asynchronous: y < categories.contentY + categories.height && asynchronous: y < categories.contentY + categories.height &&
y + height > categories.contentY y + height > categories.contentY
active: modelData !== null && active: modelData !== null && zoomer !== null &&
(modelProxy.height === 0 || (!modelData.hidden && !modelData.empty)) (zoomer.traceDuration <= 0 || (!modelData.hidden && !modelData.empty))
height: active ? Math.max(modelData.height, modelData.defaultRowHeight) : 0 height: active ? Math.max(modelData.height, modelData.defaultRowHeight) : 0
width: categories.width width: categories.width
property int visualIndex: DelegateModel.itemsIndex property int visualIndex: DelegateModel.itemsIndex