From ed0b10aff5d0afb7e8165dbf9b14f30cfd73e3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 4 Jun 2009 18:06:24 +0200 Subject: Make sure we reset the updateAll variable correctly. Makes tst_QGraphicsScene::update happy. --- src/gui/graphicsview/qgraphicsscene.cpp | 1 + tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c738f80..4578bd4 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -610,6 +610,7 @@ void QGraphicsScenePrivate::_q_emitUpdated() } } } else { + updateAll = false; for (int i = 0; i < views.size(); ++i) views.at(i)->d_func()->processPendingUpdates(); return; diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 9f93ae0..8bb9122 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -2715,6 +2715,7 @@ void tst_QGraphicsScene::update() QGraphicsRectItem *rect = new QGraphicsRectItem(0, 0, 100, 100); scene.addItem(rect); + qApp->processEvents(); rect->setPos(-100, -100); // This function forces indexing -- cgit v0.12