Commit f696d01e authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Don't needlessly interrupt the timeline flicking motion



If the timeline is being flicked and we manually set contentX from the
zoomControl callback it will stop. That's unnecessary as the flicking
itself will trigger further updates to zoomControl.

Change-Id: Id14bde1bb33d6b1f6d719a41df23074981e474da
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 2c9eb19a
......@@ -341,10 +341,12 @@ Rectangle {
if (start !== startTime || end !== endTime) {
startTime = start;
endTime = end;
var newStartX = (startTime - qmlProfilerModelProxy.traceStartTime()) *
flick.width / (endTime-startTime);
if (isFinite(newStartX) && Math.abs(newStartX - flick.contentX) >= 1)
flick.contentX = newStartX;
if (!flick.flickingHorizontally) {
var newStartX = (startTime - qmlProfilerModelProxy.traceStartTime()) *
flick.width / (endTime-startTime);
if (isFinite(newStartX) && Math.abs(newStartX - flick.contentX) >= 1)
flick.contentX = newStartX;
}
}
}
......
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