summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-07-01 15:09:17 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-07-01 15:13:17 (GMT)
commitf4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a (patch)
tree9118c40df004fdd4cd6acdfd582e25e86ea8f9c2 /src/gui/graphicsview/qgraphicsscene.cpp
parent145e17f6cc405dd935451f0151b1a8a451c78f71 (diff)
downloadQt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.zip
Qt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.tar.gz
Qt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.tar.bz2
Fix a regression with extended style option items.
We basically passed an unitialized transform to construct the styleoptions for items that use the useExtendedStyleOption flag. We had an auto-test to cover that but for some reason view.show() was removed by me so the auto-test did nothing. oops. Reviewed-by:bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 8fdf651..8a032f4 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4312,7 +4312,8 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (drawItem) {
Q_ASSERT(!itemIsFullyTransparent);
Q_ASSERT(itemHasContents);
- item->d_ptr->initStyleOption(&styleOptionTmp, transform, exposedRegion
+ ENSURE_TRANSFORM_PTR
+ item->d_ptr->initStyleOption(&styleOptionTmp, *transformPtr, exposedRegion
? *exposedRegion : QRegion(), exposedRegion == 0);
const bool itemClipsToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsToShape;
@@ -4320,10 +4321,9 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (savePainter)
painter->save();
- if (!itemHasChildren || !itemClipsChildrenToShape) {
- ENSURE_TRANSFORM_PTR
+ if (!itemHasChildren || !itemClipsChildrenToShape)
painter->setWorldTransform(*transformPtr);
- }
+
if (itemClipsToShape)
painter->setClipPath(item->shape(), Qt::IntersectClip);
painter->setOpacity(opacity);