summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-11 17:37:37 +0200
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-13 11:50:10 +0200
commit55829ebc5664a65fcef158e7ccd3579aaffa8d20 (patch)
tree4835e1e2be4937fa529ae6d6c5c78b699b3cebd2 /src
parent03415f5db33ee1d8af15b924f84b547a9ed8020b (diff)
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')
-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 05e4907518..8b133f300e 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.)).