Fix case where visible wasn't marked as dirty.
authorAlan Alpert <alan.alpert@nokia.com>
Thu, 10 May 2012 10:48:59 +0000 (20:48 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 11 May 2012 22:06:37 +0000 (00:06 +0200)
In the case where an item was marked invisible when it was already
effectively invisible, we previously did not update the dirty visibility
and so it would still get drawn when it became effectively visible.

Task-number: QTBUG-24847
Change-Id: Id1ee815e8184e4fc632214a7c8eea0a613fcc376
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickitem.cpp

index fd81328..be36d76 100644 (file)
@@ -4114,6 +4114,8 @@ void QQuickItem::setVisible(bool v)
         return;
 
     d->explicitVisible = v;
+    if (!v)
+        d->dirty(QQuickItemPrivate::Visible);
 
     const bool childVisibilityChanged = d->setEffectiveVisibleRecur(d->calcEffectiveVisible());
     if (childVisibilityChanged && d->parentItem)