forked from qt-creator/qt-creator
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 <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -130,8 +130,8 @@ inline void TimelineRenderer::getItemXExtent(int modelIndex, int i, int ¤t
|
||||
if (rawWidth < MinimumItemWidth) {
|
||||
currentX -= static_cast<int>((MinimumItemWidth - rawWidth) / 2);
|
||||
itemWidth = MinimumItemWidth;
|
||||
} else if (rawWidth > m_spacedDuration) {
|
||||
itemWidth = static_cast<int>(m_spacedDuration);
|
||||
} else if (rawWidth > m_spacedDuration - static_cast<qreal>(currentX - OutOfScreenMargin)) {
|
||||
itemWidth = static_cast<int>(m_spacedDuration) - currentX + OutOfScreenMargin;
|
||||
} else {
|
||||
itemWidth = static_cast<int>(rawWidth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user