summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-11 15:37:37 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-13 09:50:10 (GMT)
commit55829ebc5664a65fcef158e7ccd3579aaffa8d20 (patch)
tree4835e1e2be4937fa529ae6d6c5c78b699b3cebd2 /src/gui/graphicsview
parent03415f5db33ee1d8af15b924f84b547a9ed8020b (diff)
downloadQt-55829ebc5664a65fcef158e7ccd3579aaffa8d20.zip
Qt-55829ebc5664a65fcef158e7ccd3579aaffa8d20.tar.gz
Qt-55829ebc5664a65fcef158e7ccd3579aaffa8d20.tar.bz2
Reset the 'connectedToScene' flag when changing the scene of a view
In QGraphicsScene::_q_emitUpdated() the slot QGrpahicsView::updateScene(QList<QRectF>) gets connected and a boolean (connectedToScene) is set to prevent double connections. The problem is that this boolean was not reset when the view gets a new scene. Task-number: 253415 Reviewed-by: andreas
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 05e4907..8b133f3 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1681,6 +1681,7 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
disconnect(d->scene, SIGNAL(sceneRectChanged(QRectF)),
this, SLOT(updateSceneRect(QRectF)));
d->scene->d_func()->views.removeAll(this);
+ d->connectedToScene = false;
}
// Assign the new scene and update the contents (scrollbars, etc.)).