summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-05-27 13:28:26 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-05-27 14:01:52 (GMT)
commit2c54f49584023633c5992579d23dc6819ec79c9e (patch)
tree9a0478fccf23b8de47f85a838a2fee04a8ec325f /src/gui/graphicsview
parentddf119a57001edd71eb6b84dffc7cda4a8ca2c0e (diff)
downloadQt-2c54f49584023633c5992579d23dc6819ec79c9e.zip
Qt-2c54f49584023633c5992579d23dc6819ec79c9e.tar.gz
Qt-2c54f49584023633c5992579d23dc6819ec79c9e.tar.bz2
Wrong QGraphicsItem::childrenBoundingRect() when applying effects.
Problem was that we used the children's raw bounding rect instead of using their effective bounding rect when calculating the bounds. Auto test included. Task-number: QTBUG-10756
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index db6c4c5..36d21a6 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1275,14 +1275,14 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
QTransform matrix = childd->transformToParent();
if (x)
matrix *= *x;
- *rect |= matrix.mapRect(child->boundingRect());
+ *rect |= matrix.mapRect(child->d_ptr->effectiveBoundingRect());
if (!childd->children.isEmpty())
childd->childrenBoundingRectHelper(&matrix, rect);
} else {
if (x)
- *rect |= x->mapRect(child->boundingRect());
+ *rect |= x->mapRect(child->d_ptr->effectiveBoundingRect());
else
- *rect |= child->boundingRect();
+ *rect |= child->d_ptr->effectiveBoundingRect();
if (!childd->children.isEmpty())
childd->childrenBoundingRectHelper(x, rect);
}