Commit 8510c848 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Don't ignore ranges of < 500ns in overview



As most of the numbers involved are single precision floats rounding
errors can easily lead to such numbers. Instead of ignoring it set the
range to the smallest allowable value.

Task-number: QTCREATORBUG-11879
Change-Id: If8d08b27cc9e4cf2a63ff4973f519b0d3363178d
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 18ca8139
......@@ -55,9 +55,8 @@ Canvas {
return;
var newStartTime = Math.round(rangeMover.getLeft() * qmlProfilerModelProxy.traceDuration() / width) + qmlProfilerModelProxy.traceStartTime();
var newEndTime = Math.round(rangeMover.getRight() * qmlProfilerModelProxy.traceDuration() / width) + qmlProfilerModelProxy.traceStartTime();
if ((startTime !== newStartTime || endTime !== newEndTime) && newEndTime - newStartTime > 500) {
zoomControl.setRange(newStartTime, newEndTime);
}
if (startTime !== newStartTime || endTime !== newEndTime)
zoomControl.setRange(newStartTime, Math.max(newEndTime, newStartTime + 500));
}
function clamp(val, min, max) {
......
Supports Markdown
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