summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-08-14 05:53:14 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-08-14 05:53:14 (GMT)
commit5a40eb79637bda111b83a12892b80f90ea21fd78 (patch)
tree2e17136eafacb403c4bd28aa3d9824af82cc3390
parent8ed52465b705ca4ce35d9a8d1ab61e284b0f6dc3 (diff)
downloadQt-5a40eb79637bda111b83a12892b80f90ea21fd78.zip
Qt-5a40eb79637bda111b83a12892b80f90ea21fd78.tar.gz
Qt-5a40eb79637bda111b83a12892b80f90ea21fd78.tar.bz2
Make sure we get a complete when reversing a transition.
This fixes task 258702.
-rw-r--r--src/declarative/util/qmlstate.h2
-rw-r--r--src/declarative/util/qmltransition.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/util/qmlstate.h b/src/declarative/util/qmlstate.h
index 46659c6..1b35295 100644
--- a/src/declarative/util/qmlstate.h
+++ b/src/declarative/util/qmlstate.h
@@ -118,7 +118,6 @@ protected:
typedef QmlStateOperation::ActionList QmlStateActions;
class QmlTransition;
-class QmlTransitionPrivate;
class QmlStatePrivate;
class Q_DECLARATIVE_EXPORT QmlState : public QObject
{
@@ -161,7 +160,6 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE(QmlState)
Q_DISABLE_COPY(QmlState)
- friend class QmlTransitionPrivate;
};
QT_END_NAMESPACE
diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp
index eb8bf53..a9b8cb3 100644
--- a/src/declarative/util/qmltransition.cpp
+++ b/src/declarative/util/qmltransition.cpp
@@ -128,7 +128,9 @@ void ParallelAnimationWrapper::updateState(QAbstractAnimation::State oldState, Q
{
QParallelAnimationGroup::updateState(oldState, newState);
//XXX not 100% guaranteed to be at end (if there are many zero duration animations at the end)?
- if (newState == Stopped && currentTime() == duration())
+ if (newState == Stopped &&
+ ((direction() == QAbstractAnimation::Forward && currentTime() == duration()) ||
+ (direction() == QAbstractAnimation::Backward && currentTime() == 0)))
{
trans->complete();
}