diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-11-22 14:21:08 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-11-22 13:43:58 +0000 |
commit | 08ba34d6a8cf7e7ab21ce51ca6aa7d812d035a67 (patch) | |
tree | dbd1b9aa096c47903629d092d7cf9a364f496aec /src/quicktemplates2 | |
parent | 2c6553fa5ea19e7861b31587ac879da83ebb0925 (diff) |
SwipeDelegate: fix broken swiping after calling SwipeDelegate.close()
Reset the internal state when close() is called to ensure that it's
consistent.
Task-number: QTBUG-57243
Change-Id: Id52724e0eb296c3f8a4fc0a0587a04558b1d1ab6
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r-- | src/quicktemplates2/qquickswipedelegate.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp index fe678b80..caeea3e9 100644 --- a/src/quicktemplates2/qquickswipedelegate.cpp +++ b/src/quicktemplates2/qquickswipedelegate.cpp @@ -562,8 +562,12 @@ void QQuickSwipe::setComplete(bool complete) void QQuickSwipe::close() { + Q_D(QQuickSwipe); setPosition(0); setComplete(false); + d->wasComplete = false; + d->positionBeforePress = 0.0; + d->velocityCalculator.reset(); } class QQuickSwipeDelegatePrivate : public QQuickItemDelegatePrivate |