From 12d2877ac0ed64caf9f40f157e687ae58ebbd674 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 18 Aug 2011 15:38:25 +0200 Subject: [PATCH] Fixed QSGPaintedItem updates when a contentsScale is set. Change-Id: Iee9cd4503bcfdce39b6ee4beaccfed7da45cb8bc Reviewed-on: http://codereview.qt.nokia.com/3192 Reviewed-by: Qt Sanity Bot Reviewed-by: Yoann Lopes --- src/declarative/items/qsgpainteditem.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/declarative/items/qsgpainteditem.cpp b/src/declarative/items/qsgpainteditem.cpp index d4543c9..95aa2b4 100644 --- a/src/declarative/items/qsgpainteditem.cpp +++ b/src/declarative/items/qsgpainteditem.cpp @@ -150,15 +150,10 @@ void QSGPaintedItem::update(const QRect &rect) Q_D(QSGPaintedItem); d->contentsDirty = true; - QRect srect(qCeil(rect.x()*d->contentsScale), - qCeil(rect.y()*d->contentsScale), - qCeil(rect.width()*d->contentsScale), - qCeil(rect.height()*d->contentsScale)); - - if (srect.isNull() && !d->dirtyRect.isNull()) + if (rect.isNull() && !d->dirtyRect.isNull()) d->dirtyRect = contentsBoundingRect().toAlignedRect(); else - d->dirtyRect |= (contentsBoundingRect() & srect).toAlignedRect(); + d->dirtyRect |= (contentsBoundingRect() & rect).toAlignedRect(); QSGItem::update(); } -- 2.7.4