forked from qt-creator/qt-creator
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: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user