diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-13 12:23:04 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-13 13:17:01 (GMT) |
commit | 548155fec3a8b575215625d4fd767e63c20f6b84 (patch) | |
tree | de72a03ef2705665bf9dee7a1b0ae8a469e1c651 /src | |
parent | 0313095b876e86cee5a83a3147aa182e1f2061b8 (diff) | |
download | Qt-548155fec3a8b575215625d4fd767e63c20f6b84.zip Qt-548155fec3a8b575215625d4fd767e63c20f6b84.tar.gz Qt-548155fec3a8b575215625d4fd767e63c20f6b84.tar.bz2 |
Assertion calledEmitUpdated fails in QGraphicsScene.
Problem was that the 'updateAll' boolean was reset to 'false' when it really
should have been unchanged. This happened when rendering the scene from outside
the view's paint event (i.e. from QGraphicsView/Scene::render). We only
want to reset 'updateAll' when triggering drawItems() from
QGraphicsView::paintEvent, i.e. when the 'view' pointer != 0.
Broke after commit: dda8a57c.
Auto test included.
Task-number: QT-3674
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 539685a..36a24db 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5270,7 +5270,6 @@ void QGraphicsScene::drawItems(QPainter *painter, if (!d->unpolishedItems.isEmpty()) d->_q_polishItems(); - d->updateAll = false; QTransform viewTransform = painter->worldTransform(); Q_UNUSED(options); @@ -5279,6 +5278,7 @@ void QGraphicsScene::drawItems(QPainter *painter, QRegion *expose = 0; const quint32 oldRectAdjust = d->rectAdjust; if (view) { + d->updateAll = false; expose = &view->d_func()->exposedRegion; if (view->d_func()->optimizationFlags & QGraphicsView::DontAdjustForAntialiasing) d->rectAdjust = 1; |