summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-01-28 09:55:46 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-01-28 09:55:46 (GMT)
commita0f790009ae9a1e085169d81ae7f9017142b49ad (patch)
tree9ea3267a7e2a2d5b7b2f6d13212f08a8a01a278b /src/gui
parentf3ad942805cd976912ac8395ef526430b9db6350 (diff)
parent692e12b928fa94209a38afc7693be3469bc57039 (diff)
downloadQt-a0f790009ae9a1e085169d81ae7f9017142b49ad.zip
Qt-a0f790009ae9a1e085169d81ae7f9017142b49ad.tar.gz
Qt-a0f790009ae9a1e085169d81ae7f9017142b49ad.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-os1
Conflicts: src/gui/graphicsview/qgraphicsscene.cpp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h3
4 files changed, 11 insertions, 6 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index ad23df3..10ef5ea 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -383,9 +383,9 @@ void QGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) cons
{
if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect
&& (reason == EffectRectChanged
- || reason == TransformChanged
- && m_cachedSystem == Qt::LogicalCoordinates))
+ || (reason == TransformChanged && m_cachedSystem == Qt::LogicalCoordinates))) {
return;
+ }
QPixmapCache::remove(m_cacheKey);
}
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 10d31ea..9773404 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7253,7 +7253,9 @@ void QGraphicsItem::prepareGeometryChange()
QGraphicsScenePrivate *scenePrivate = d_ptr->scene->d_func();
scenePrivate->index->prepareBoundingRectChange(this);
- scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true);
+ scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true, /*force=*/false,
+ /*ignoreOpacity=*/ false, /*removingItemFromScene=*/ false,
+ /*updateBoundingRect=*/true);
// For compatibility reasons, we have to update the item's old geometry
// if someone is connected to the changed signal or the scene has no views.
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 9219773..54d47fa 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4832,7 +4832,8 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
}
void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, bool invalidateChildren,
- bool force, bool ignoreOpacity, bool removingItemFromScene)
+ bool force, bool ignoreOpacity, bool removingItemFromScene,
+ bool updateBoundingRect)
{
Q_ASSERT(item);
if (updateAll)
@@ -4903,7 +4904,8 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
if (ignoreOpacity)
item->d_ptr->ignoreOpacity = 1;
- item->d_ptr->markParentDirty();
+ if (!updateBoundingRect)
+ item->d_ptr->markParentDirty();
}
static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item,
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 54d8130..04ffe0f 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -222,7 +222,8 @@ public:
QRegion *, QWidget *, qreal, const QTransform *const, bool, bool);
void markDirty(QGraphicsItem *item, const QRectF &rect = QRectF(), bool invalidateChildren = false,
- bool force = false, bool ignoreOpacity = false, bool removingItemFromScene = false);
+ bool force = false, bool ignoreOpacity = false, bool removingItemFromScene = false,
+ bool updateBoundingRect = false);
void processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren = false,
qreal parentOpacity = qreal(1.0));