summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-04 15:31:47 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:34:12 (GMT)
commitad92e095ea34dda9d099fae30340a8fbb4c5380a (patch)
treef245499bda45b91cf86fbbbe0f1b6d75918c0d75 /src/gui/graphicsview/qgraphicsitem.cpp
parent98f197d1a11c3dd13959967534b1dba7eea479ea (diff)
downloadQt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.zip
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.gz
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.bz2
Compatibility fix for QGraphicsScene::sceneRectChanged()/sceneRect().
We have to keep the growingItemsBoundingRect up-to-date if there's no scene rect. The only difference now is that sceneRectChanged will not be emitted before entering the event-loop, but the documentation only states it'll be emitted when the scene rect changes, so we consider it harmless. Makes tst_QGraphicsView::sceneRect_growing and tst_QGrahicsScene::sceneRect happy. Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 47a9ae2..807ee06 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -5977,6 +5977,7 @@ void QGraphicsItem::removeFromIndex()
void QGraphicsItem::prepareGeometryChange()
{
if (d_ptr->scene) {
+ d_ptr->geometryChanged = 1;
d_ptr->paintedViewBoundingRectsNeedRepaint = 1;
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,