Fix updating text color in Text element
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Fri, 3 Feb 2012 12:49:00 +0000 (13:49 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 6 Feb 2012 09:22:46 +0000 (10:22 +0100)
The setColor() function in QQuickText calls markDirty() which
did not specify that the whole paint node should be updated, so
color updates would have no effect until something else changed.

Change-Id: I93741b6c697f2dd6ad5a315250502a7a6e3ce1d7
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
src/quick/items/qquicktext.cpp

index 704dfc9..0e1c5a8 100644 (file)
@@ -1028,8 +1028,10 @@ QPixmap QQuickTextPrivate::textDocumentImage(bool drawStyle)
 void QQuickTextPrivate::markDirty()
 {
     Q_Q(QQuickText);
-    if (!invalidateImageCache() && q->isComponentComplete())
+    if (!invalidateImageCache() && q->isComponentComplete()) {
+       updateType = UpdatePaintNode;
        q->update();
+    }
 }
 
 /*!