aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2011-08-18 15:38:25 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-24 15:15:46 +0200
commit12d2877ac0ed64caf9f40f157e687ae58ebbd674 (patch)
tree4932d99ea9661397c803111b42223b6066c0bde1 /src
parent7991b204fd7dd4909a853531cf8eb23835bbce39 (diff)
Fixed QSGPaintedItem updates when a contentsScale is set.
Change-Id: Iee9cd4503bcfdce39b6ee4beaccfed7da45cb8bc Reviewed-on: http://codereview.qt.nokia.com/3192 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgpainteditem.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/declarative/items/qsgpainteditem.cpp b/src/declarative/items/qsgpainteditem.cpp
index d4543c94f4..95aa2b4fb2 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();
}