summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-03 14:52:10 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-06 11:49:55 (GMT)
commit416fd77e653d089b7832002a68d5b7725fa492db (patch)
tree254b6bab6b0bac1fb5adfecc960572ae2a33646a /src
parent3dc62362f3380fa653bc1225ce06e5e4cefa745a (diff)
downloadQt-416fd77e653d089b7832002a68d5b7725fa492db.zip
Qt-416fd77e653d089b7832002a68d5b7725fa492db.tar.gz
Qt-416fd77e653d089b7832002a68d5b7725fa492db.tar.bz2
Fixes: Wrong adjustment of rect added in 0aa2ef27249dc8e782c2942340776bb19de80a0d
RevBy: TrustMe AutoTest: tst_QGraphicsItem::boundingRegion() pass again Details: The original code adjusted the QRect version of a mapped bounding rect, wheras my patch adjusted a mapped bounding rect (QRectF) and then converted it to a QRect.
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 8478561..9d320b7 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3488,9 +3488,8 @@ QRegion QGraphicsItem::boundingRegion(const QTransform &itemToDeviceTransform) c
// into the bitmap, converts the result to a QRegion and scales the region
// back to device space with inverse granularity.
qreal granularity = boundingRegionGranularity();
- QRectF adjustedMappedBoundingRect(itemToDeviceTransform.mapRect(boundingRect()));
- _q_adjustRect(&adjustedMappedBoundingRect);
- QRect deviceRect = adjustedMappedBoundingRect.toRect();
+ QRect deviceRect = itemToDeviceTransform.mapRect(boundingRect()).toRect();
+ _q_adjustRect(&deviceRect);
if (granularity == 0.0)
return QRegion(deviceRect);