summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-03 14:52:10 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-04-15 10:24:05 (GMT)
commitfdff47ac6baebf0611f98e7e25c90d54413fbe06 (patch)
tree2709136a06b5cd1c5b0775313bbe392d2eca96ad
parent45e2f2f949b8655b6de9b3a875dd8509d1c5369e (diff)
downloadQt-fdff47ac6baebf0611f98e7e25c90d54413fbe06.zip
Qt-fdff47ac6baebf0611f98e7e25c90d54413fbe06.tar.gz
Qt-fdff47ac6baebf0611f98e7e25c90d54413fbe06.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. (cherry picked from commit 416fd77e653d089b7832002a68d5b7725fa492db)
-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 175b128..d8daaf4 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);