From 7659159017d09779beaf13f88aa4973835e8d19b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 26 Nov 2014 18:56:18 +0100 Subject: [PATCH] QmlProfiler: Constrain the length of painted events to the visible area When overpainting, some note markers won't be visible. Change-Id: I7888d43e8b1e3503b7a90e773e9c8138b70070f0 Task-number: QTCREATORBUG-13534 Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/timelinerenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmlprofiler/timelinerenderer.cpp b/src/plugins/qmlprofiler/timelinerenderer.cpp index a80afadaa6d..06ae485ecaa 100644 --- a/src/plugins/qmlprofiler/timelinerenderer.cpp +++ b/src/plugins/qmlprofiler/timelinerenderer.cpp @@ -130,8 +130,8 @@ inline void TimelineRenderer::getItemXExtent(int modelIndex, int i, int ¤t if (rawWidth < MinimumItemWidth) { currentX -= static_cast((MinimumItemWidth - rawWidth) / 2); itemWidth = MinimumItemWidth; - } else if (rawWidth > m_spacedDuration) { - itemWidth = static_cast(m_spacedDuration); + } else if (rawWidth > m_spacedDuration - static_cast(currentX - OutOfScreenMargin)) { + itemWidth = static_cast(m_spacedDuration) - currentX + OutOfScreenMargin; } else { itemWidth = static_cast(rawWidth); }