diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-19 14:00:57 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-24 11:45:05 (GMT) |
commit | 7a5fa8af2d0c3329dd1962d6b053388a960f8305 (patch) | |
tree | 000ab5a75b849b95c34c80d305bf31530c51ac69 /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 337f2562c5b3b5dc99f62b406f13021e502791e7 (diff) | |
download | Qt-7a5fa8af2d0c3329dd1962d6b053388a960f8305.zip Qt-7a5fa8af2d0c3329dd1962d6b053388a960f8305.tar.gz Qt-7a5fa8af2d0c3329dd1962d6b053388a960f8305.tar.bz2 |
QGraphicsView: Fix assert that may occurs if there are 'empty' item to draw, and changed() signal connected
Reviewed-by: bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index a98ce6f..3c23884 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5126,7 +5126,9 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool q->update(itemBoundingRect.translated(item->d_ptr->sceneTransform.dx(), item->d_ptr->sceneTransform.dy())); } else { - q->update(item->d_ptr->sceneTransform.mapRect(itemBoundingRect)); + QRectF rect = item->d_ptr->sceneTransform.mapRect(itemBoundingRect); + if (!rect.isEmpty()) + q->update(rect); } } else { QRectF dirtyRect; |