From 8c6cb64d1ed52b39ff1ddeae7346a69df9de0f57 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 21 Nov 2013 15:04:49 +0100 Subject: [PATCH] QmlProfiler: Make range selection boundaries consistent You shouldn't be able to select out of range areas with the selector in the timeline if you can't scroll to see them anyway. Change-Id: Ia1909f463db2c64dc2605eac7f4be53a76222338 Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/qml/SelectionRange.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/qmlprofiler/qml/SelectionRange.qml b/src/plugins/qmlprofiler/qml/SelectionRange.qml index 86fdb2a7c6f..e3930c7d168 100644 --- a/src/plugins/qmlprofiler/qml/SelectionRange.qml +++ b/src/plugins/qmlprofiler/qml/SelectionRange.qml @@ -69,6 +69,11 @@ RangeMover { } function setPos(pos) { + if (pos < 0) + pos = 0; + else if (pos > width) + pos = width; + switch (creationState) { case 1: { setLeft(pos);