summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-14 06:01:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-14 06:01:37 (GMT)
commite0c87958b1e2e61da80b2726226bc89982680161 (patch)
tree03ccc9aa5cc70736c087a724d9e7952a1a73ba28 /src
parent42242b3781cbc23a4b7da733a0eff36607ebabcb (diff)
parent6824699348235dbee41e5e8b70d789dbde7febcb (diff)
downloadQt-e0c87958b1e2e61da80b2726226bc89982680161.zip
Qt-e0c87958b1e2e61da80b2726226bc89982680161.tar.gz
Qt-e0c87958b1e2e61da80b2726226bc89982680161.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: In ParentChange treat flip in x and y as a 180 degree rotation
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp5
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 3c09747..ea3da25 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -2699,14 +2699,15 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
qreal scale = 1;
qreal rotation = 0;
- if (ok && transform.type() != QTransform::TxRotate) {
+ bool isRotate = (transform.type() == QTransform::TxRotate) || (transform.m11() < 0);
+ if (ok && !isRotate) {
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
- } else if (ok && transform.type() == QTransform::TxRotate) {
+ } else if (ok && isRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 845b3da..a78fc54 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -98,14 +98,15 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q
qreal scale = 1;
qreal rotation = 0;
- if (ok && transform.type() != QTransform::TxRotate) {
+ bool isRotate = (transform.type() == QTransform::TxRotate) || (transform.m11() < 0);
+ if (ok && !isRotate) {
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
- } else if (ok && transform.type() == QTransform::TxRotate) {
+ } else if (ok && isRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {