summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-01-20 14:11:58 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-01-29 16:25:08 (GMT)
commit08c649e6a81ab13d0c7db6aa1b480ed149e3f770 (patch)
tree8a130b0fcc01890392563af2135eaa84f274c87b /src/gui/graphicsview/qgraphicsitem.cpp
parent3db33d41ad48953ec7c8d74db24d17fc3685895f (diff)
downloadQt-08c649e6a81ab13d0c7db6aa1b480ed149e3f770.zip
Qt-08c649e6a81ab13d0c7db6aa1b480ed149e3f770.tar.gz
Qt-08c649e6a81ab13d0c7db6aa1b480ed149e3f770.tar.bz2
Avoids missing opacity updates by not propagating the ignoreOpacity flag
When doing a full update of a parent item, by setting one of these flags, QGraphicsItem::ItemIgnoresTransformations | ItemClipsChildrenToShape | ItemIsSelectable, the child items that were transparent would not be shown when setting their respective opacity to 1.0 We just need to set the ignoreOpacity flag when setting opacity to 0.0. This avoids propagating this flag to the child items when it's not needed. Task-number: QT-2653 Reviewed-by: bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index ed36f87..86780da 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2584,7 +2584,7 @@ void QGraphicsItem::setOpacity(qreal opacity)
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
/*force=*/false,
- /*ignoreOpacity=*/true);
+ /*ignoreOpacity=*/d_ptr->isOpacityNull());
}
if (d_ptr->isObject)