summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-11 09:42:05 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-11 09:42:05 (GMT)
commit615f8a53355ea501e489eecddab1d5c4295cab80 (patch)
tree978d0233deb86011106457cefd220f838a946859
parent65373d007797b559a573b7b08f40c6801da11686 (diff)
downloadQt-615f8a53355ea501e489eecddab1d5c4295cab80.zip
Qt-615f8a53355ea501e489eecddab1d5c4295cab80.tar.gz
Qt-615f8a53355ea501e489eecddab1d5c4295cab80.tar.bz2
Partially revert "Add (back) properties to QGraphicsItem to change the
transformations component" This partially reverts commit 56f23d4c, which changed the logic in updateCachedClipPathFromSetPosHelper. We cannot compute the item's transform relative to the parent by using transformToParent() because the new position is not yet set on the item, that's why the new position is passed into the function. However, I'll look into how we can get rid of the entire function, but keep it as is for now. Reviewed-by: Olivier
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index f50d210..eae2bf3 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -4281,7 +4281,9 @@ void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(const QPointF &n
// Find closest clip ancestor and transform.
Q_Q(QGraphicsItem);
// COMBINE
- QTransform thisToParentTransform = transformToParent();
+ QTransform thisToParentTransform = transformData
+ ? transformData->computedFullTransform() * QTransform::fromTranslate(newPos.x(), newPos.y())
+ : QTransform::fromTranslate(newPos.x(), newPos.y());
QGraphicsItem *clipParent = parent;
while (clipParent && !(clipParent->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape)) {
thisToParentTransform *= clipParent->d_ptr->transformToParent();