diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-02-20 15:22:22 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-02-21 12:37:30 +0100 |
commit | b633fc186a8d133dff05748636d3f6708ff58134 (patch) | |
tree | 9e07439640381047ba44e6682a4e78e469729d71 | |
parent | 666c810505e53e95fc17487f37feaf852f1e22ac (diff) | |
download | qt-creator-b633fc186a8d133dff05748636d3f6708ff58134.tar.gz |
QmlProfiler: Fix range selection
MainView.eventCount is always 0 since the last cleanup. It doesn't do
anything useful and can be removed.
Task-number: QTCREATORBUG-11515
Change-Id: I367a11e41c34e691550b6d6e5943fc372f0f04ca
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
-rw-r--r-- | src/plugins/qmlprofiler/qml/MainView.qml | 9 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/qml/SelectionRange.qml | 6 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml index bdada21a54..21d102fdb3 100644 --- a/src/plugins/qmlprofiler/qml/MainView.qml +++ b/src/plugins/qmlprofiler/qml/MainView.qml @@ -38,8 +38,6 @@ Rectangle { property int singleRowHeight: 30 - property int eventCount: 0 - property alias selectionLocked : view.selectionLocked signal updateLockButton property alias selectedItem: view.selectedItem @@ -116,7 +114,6 @@ Rectangle { function clearData() { view.clearData(); appKilled = false; - eventCount = 0; hideRangeDetails(); selectionRangeMode = false; updateRangeButton(); @@ -206,7 +203,7 @@ Rectangle { // ***** slots onSelectionRangeModeChanged: { selectionRangeControl.enabled = selectionRangeMode; - selectionRange.reset(selectionRangeMode); + selectionRange.reset(); } onSelectionLockedChanged: { @@ -280,7 +277,7 @@ Rectangle { SelectionRange { id: selectionRange - visible: root.selectionRangeMode + visible: root.selectionRangeMode && creationState !== 0 height: parent.height z: 2 } @@ -423,7 +420,7 @@ Rectangle { SelectionRangeDetails { id: selectionRangeDetails - visible: root.selectionRangeMode + visible: selectionRange.visible startTime: selectionRange.startTimeString duration: selectionRange.durationString endTime: selectionRange.endTimeString diff --git a/src/plugins/qmlprofiler/qml/SelectionRange.qml b/src/plugins/qmlprofiler/qml/SelectionRange.qml index feafbbe997..f565571294 100644 --- a/src/plugins/qmlprofiler/qml/SelectionRange.qml +++ b/src/plugins/qmlprofiler/qml/SelectionRange.qml @@ -63,11 +63,10 @@ RangeMover { root.updateRangeButton(); } - function reset(setVisible) { + function reset() { setRight(getLeft() + 1); creationState = 0; creationReference = 0; - visible = setVisible; } function setPos(pos) { @@ -129,9 +128,6 @@ RangeMover { selectionRange.creationState = 1; } - if (!root.eventCount) - return; - if (!selectionRangeControl.pressed && selectionRange.creationState==3) return; |