summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorAndy Shaw <qt-info@nokia.com>2009-05-06 13:42:54 (GMT)
committerAndy Shaw <qt-info@nokia.com>2009-05-06 13:42:54 (GMT)
commitf2123c9bbbe6468eaa6ab2b578ae0352094aa708 (patch)
treea3fab6a41abb349cf70dce36addae90defe73f37 /src/gui/graphicsview/qgraphicsitem.cpp
parentb35bde7308016bbf32f28940a27bb37c74343375 (diff)
parent2e3a5ea4434d19fbdb90996e71961f0791ea6487 (diff)
downloadQt-f2123c9bbbe6468eaa6ab2b578ae0352094aa708.zip
Qt-f2123c9bbbe6468eaa6ab2b578ae0352094aa708.tar.gz
Qt-f2123c9bbbe6468eaa6ab2b578ae0352094aa708.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 3e8d38f..11ec24b 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1921,7 +1921,7 @@ void QGraphicsItem::setOpacity(qreal opacity)
itemChange(ItemOpacityHasChanged, newOpacity);
// Update.
- d_ptr->fullUpdateHelper();
+ d_ptr->fullUpdateHelper(/*childrenOnly=*/false, /*maybeDirtyClipPath=*/false, /*ignoreOpacity=*/true);
}
/*!
@@ -3621,9 +3621,8 @@ void QGraphicsItem::setBoundingRegionGranularity(qreal granularity)
\internal
Returns true if we can discard an update request; otherwise false.
*/
-bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping,
- bool ignoreVisibleBit,
- bool ignoreDirtyBit) const
+bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping, bool ignoreVisibleBit,
+ bool ignoreDirtyBit, bool ignoreOpacity) const
{
// No scene, or if the scene is updating everything, means we have nothing
// to do. The only exception is if the scene tracks the growing scene rect.
@@ -3632,7 +3631,7 @@ bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping,
|| !scene
|| (scene->d_func()->updateAll && scene->d_func()->hasSceneRect)
|| (!ignoreClipping && (childrenClippedToShape() && isClippedAway()))
- || (childrenCombineOpacity() && isFullyTransparent());
+ || (!ignoreOpacity && childrenCombineOpacity() && isFullyTransparent());
}
/*!
@@ -3662,11 +3661,10 @@ void QGraphicsItemPrivate::updateHelper(const QRectF &rect, bool force, bool may
Propagates updates to \a item and all its children.
*/
-void QGraphicsItemPrivate::fullUpdateHelper(bool childrenOnly, bool maybeDirtyClipPath)
+void QGraphicsItemPrivate::fullUpdateHelper(bool childrenOnly, bool maybeDirtyClipPath, bool ignoreOpacity)
{
- if (discardUpdateRequest(/*ignoreClipping=*/maybeDirtyClipPath,
- /*ignoreVisibleBit=*/false,
- /*ignoreDirtyBit=*/true)) {
+ if (discardUpdateRequest(/*ignoreClipping=*/maybeDirtyClipPath, /*ignoreVisibleBit=*/false,
+ /*ignoreDirtyBit=*/true, ignoreOpacity)) {
return;
}