summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-04 17:57:04 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:34:46 (GMT)
commit4af92dcf716ee3c2fc4673aadd07fde19b7bffed (patch)
tree5731e6e04e83497ac233be00cad605d6c8e5bb69 /src/gui/graphicsview
parentf1ada923f7bbe8724d9a9d6a6b391a92c514c440 (diff)
downloadQt-4af92dcf716ee3c2fc4673aadd07fde19b7bffed.zip
Qt-4af92dcf716ee3c2fc4673aadd07fde19b7bffed.tar.gz
Qt-4af92dcf716ee3c2fc4673aadd07fde19b7bffed.tar.bz2
Make sure the dirty state of an item is reset when removed from the scene.
Makes tst_QGraphicsItem::paint happy.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index e5c65d1..eaf00a0 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -758,6 +758,7 @@ void QGraphicsScenePrivate::_q_removeItemLater(QGraphicsItem *item)
cachedItemsUnderMouse.removeAll(item);
unpolishedItems.removeAll(item);
pendingUpdateItems.removeAll(item);
+ resetDirtyItem(item);
//We remove all references of item from the sceneEventFilter arrays
QMultiMap<QGraphicsItem*, QGraphicsItem*>::iterator iterator = sceneEventFilters.begin();
@@ -3408,6 +3409,7 @@ void QGraphicsScene::removeItem(QGraphicsItem *item)
d->pendingUpdateItems.removeAll(item);
d->cachedItemsUnderMouse.removeAll(item);
d->unpolishedItems.removeAll(item);
+ d->resetDirtyItem(item);
//We remove all references of item from the sceneEventFilter arrays
QMultiMap<QGraphicsItem*, QGraphicsItem*>::iterator iterator = d->sceneEventFilters.begin();