summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-26 07:02:53 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-26 07:02:53 (GMT)
commitb8952aef84c78949959728674db39eafb19efee7 (patch)
treea258b882059cf7e749e447e230a56e7a8e17c55d /src/declarative/graphicsitems/qdeclarativeitem.cpp
parent56309fe1461c4ea3ca654e535a525165c28a0f12 (diff)
downloadQt-b8952aef84c78949959728674db39eafb19efee7.zip
Qt-b8952aef84c78949959728674db39eafb19efee7.tar.gz
Qt-b8952aef84c78949959728674db39eafb19efee7.tar.bz2
Test and fix order of transform application.
Remove Translate.z since Qt cannot sensibly support it yet.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 048e1a8..611535c 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -89,11 +89,12 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Translate QGraphicsTranslate
\since 4.7
- \brief The Translate object provides a way to move an Item without changing its x or y.
+ \brief The Translate object provides a way to move an Item without changing its x or y properties.
The Translate object independent control over position in addition to the Item's x and y properties.
- The following example moves the X axis of the Rectangle, relative to its interior point 25, 25:
+ The following example moves the Y axis of the Rectangles while still allowing the Row element
+ to lay the items out as if they had not been transformed:
\qml
Row {
Rectangle {
@@ -1562,8 +1563,8 @@ int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty<QGraphicsT
void QDeclarativeItemPrivate::transform_append(QDeclarativeListProperty<QGraphicsTransform> *list, QGraphicsTransform *item)
{
QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object);
- if (object)
- QGraphicsItemPrivate::get(object)->appendGraphicsTransform(item);
+ if (object) // QGraphicsItem applies the list in the wrong order, so we prepend.
+ QGraphicsItemPrivate::get(object)->prependGraphicsTransform(item);
}
QGraphicsTransform *QDeclarativeItemPrivate::transform_at(QDeclarativeListProperty<QGraphicsTransform> *list, int idx)