summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstateoperations.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-13 00:37:41 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-13 00:37:41 (GMT)
commite0a137cd1b138e63804756f897a20bf8178efb84 (patch)
treeaf495868d66869eeac6e6dc5868d514539cfb2d7 /src/declarative/util/qmlstateoperations.cpp
parentabb70694334a770d4acb0ec607bb9b02defd1204 (diff)
parent1e09535438b5dc7d2961b9bb22340a86a80f8856 (diff)
downloadQt-e0a137cd1b138e63804756f897a20bf8178efb84.zip
Qt-e0a137cd1b138e63804756f897a20bf8178efb84.tar.gz
Qt-e0a137cd1b138e63804756f897a20bf8178efb84.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/util/qmlstateoperations.cpp')
-rw-r--r--src/declarative/util/qmlstateoperations.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 7e0ac66..2d32fdb 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -76,18 +76,19 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
const QTransform &transform = target->itemTransform(targetParent, &ok);
if (transform.type() >= QTransform::TxShear || !ok) {
qmlInfo(q) << QObject::tr("Unable to preserve appearance under complex transform");
+ ok = false;
}
qreal scale = 1;
qreal rotation = 0;
- if (transform.type() != QTransform::TxRotate) {
+ if (ok && transform.type() != QTransform::TxRotate) {
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
- } else if (transform.type() == QTransform::TxRotate) {
+ } else if (ok && transform.type() == QTransform::TxRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {
@@ -105,7 +106,7 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
qreal xt = transform.dx();
qreal yt = transform.dy();
- if (target->transformOrigin() != QmlGraphicsItem::TopLeft) {
+ if (ok && target->transformOrigin() != QmlGraphicsItem::TopLeft) {
qreal tempxt = target->transformOriginPoint().x();
qreal tempyt = target->transformOriginPoint().y();
QTransform t;