Commit b633fc18 authored by Ulf Hermann's avatar Ulf Hermann

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: default avatarKai Koehne <kai.koehne@digia.com>
parent 666c8105
...@@ -38,8 +38,6 @@ Rectangle { ...@@ -38,8 +38,6 @@ Rectangle {
property int singleRowHeight: 30 property int singleRowHeight: 30
property int eventCount: 0
property alias selectionLocked : view.selectionLocked property alias selectionLocked : view.selectionLocked
signal updateLockButton signal updateLockButton
property alias selectedItem: view.selectedItem property alias selectedItem: view.selectedItem
...@@ -116,7 +114,6 @@ Rectangle { ...@@ -116,7 +114,6 @@ Rectangle {
function clearData() { function clearData() {
view.clearData(); view.clearData();
appKilled = false; appKilled = false;
eventCount = 0;
hideRangeDetails(); hideRangeDetails();
selectionRangeMode = false; selectionRangeMode = false;
updateRangeButton(); updateRangeButton();
...@@ -206,7 +203,7 @@ Rectangle { ...@@ -206,7 +203,7 @@ Rectangle {
// ***** slots // ***** slots
onSelectionRangeModeChanged: { onSelectionRangeModeChanged: {
selectionRangeControl.enabled = selectionRangeMode; selectionRangeControl.enabled = selectionRangeMode;
selectionRange.reset(selectionRangeMode); selectionRange.reset();
} }
onSelectionLockedChanged: { onSelectionLockedChanged: {
...@@ -280,7 +277,7 @@ Rectangle { ...@@ -280,7 +277,7 @@ Rectangle {
SelectionRange { SelectionRange {
id: selectionRange id: selectionRange
visible: root.selectionRangeMode visible: root.selectionRangeMode && creationState !== 0
height: parent.height height: parent.height
z: 2 z: 2
} }
...@@ -423,7 +420,7 @@ Rectangle { ...@@ -423,7 +420,7 @@ Rectangle {
SelectionRangeDetails { SelectionRangeDetails {
id: selectionRangeDetails id: selectionRangeDetails
visible: root.selectionRangeMode visible: selectionRange.visible
startTime: selectionRange.startTimeString startTime: selectionRange.startTimeString
duration: selectionRange.durationString duration: selectionRange.durationString
endTime: selectionRange.endTimeString endTime: selectionRange.endTimeString
......
...@@ -63,11 +63,10 @@ RangeMover { ...@@ -63,11 +63,10 @@ RangeMover {
root.updateRangeButton(); root.updateRangeButton();
} }
function reset(setVisible) { function reset() {
setRight(getLeft() + 1); setRight(getLeft() + 1);
creationState = 0; creationState = 0;
creationReference = 0; creationReference = 0;
visible = setVisible;
} }
function setPos(pos) { function setPos(pos) {
...@@ -129,9 +128,6 @@ RangeMover { ...@@ -129,9 +128,6 @@ RangeMover {
selectionRange.creationState = 1; selectionRange.creationState = 1;
} }
if (!root.eventCount)
return;
if (!selectionRangeControl.pressed && selectionRange.creationState==3) if (!selectionRangeControl.pressed && selectionRange.creationState==3)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment