diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-01-20 14:11:58 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-01-29 16:25:08 (GMT) |
commit | 08c649e6a81ab13d0c7db6aa1b480ed149e3f770 (patch) | |
tree | 8a130b0fcc01890392563af2135eaa84f274c87b /src/gui | |
parent | 3db33d41ad48953ec7c8d74db24d17fc3685895f (diff) | |
download | Qt-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')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 2 |
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) |