diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-01-19 10:09:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-27 06:23:15 +0100 |
commit | 3bbe8fdbab9a1f2f3f8ca40d5e25e2d5c5fb1a75 (patch) | |
tree | 485997211dd71688e2d4d452b00f8f150dde5c43 /src/quick/util | |
parent | abd8ff8b03038f349c8b54f094e500516e249f1b (diff) |
PathInterpolator should report angle in clockwise direction.
This makes it much more intuitive when binding item rotation to angle.
Change-Id: I5654866d9cd1c0ff5899c5571532fc7fedddd440
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qdeclarativepathinterpolator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/util/qdeclarativepathinterpolator.cpp b/src/quick/util/qdeclarativepathinterpolator.cpp index 52b57e6b24..46038f9c0a 100644 --- a/src/quick/util/qdeclarativepathinterpolator.cpp +++ b/src/quick/util/qdeclarativepathinterpolator.cpp @@ -113,6 +113,11 @@ void QDeclarativePathInterpolator::_q_pathUpdated() emit yChanged(); } + //convert to clockwise + angle = qreal(360) - angle; + if (qFuzzyCompare(angle, qreal(360))) + angle = qreal(0); + if (angle != _angle) { _angle = angle; emit angleChanged(); |