diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-11 14:24:40 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-11 16:25:52 (GMT) |
commit | a1786a441e9101500ae2c28a5226372ba0c7b4a2 (patch) | |
tree | e28b87d8cdf19e9903f879f7b37e4b5901109899 /src/gui/graphicsview/qgraphicsview_p.h | |
parent | fa5f3a4464f8265692c2ff50bd03b9b24b6ad912 (diff) | |
download | Qt-a1786a441e9101500ae2c28a5226372ba0c7b4a2.zip Qt-a1786a441e9101500ae2c28a5226372ba0c7b4a2.tar.gz Qt-a1786a441e9101500ae2c28a5226372ba0c7b4a2.tar.bz2 |
QGraphicsView: Replace update() with updateAll().
We have some nice cut-offs when there's a full update pending, but we
don't know about it if we call update() directly on the viewport.
Instead call QGraphicsViewPrivate::updateAll() which has the same
effect, except that it also sets a flag telling us a full update is
pending.
Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview_p.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index 814e476..00f3035 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -163,7 +163,13 @@ public: QRegion dirtyRegion; QRect dirtyBoundingRect; void processPendingUpdates(); - void updateAll(); + inline void updateAll() + { + viewport->update(); + fullUpdatePending = true; + dirtyBoundingRect = QRect(); + dirtyRegion = QRegion(); + } void updateRect(const QRect &rect); void updateRegion(const QRegion ®ion); bool updateSceneSlotReimplementedChecked; |