Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0 Beta
-
None
-
08ba34d6a8cf7e7ab21ce51ca6aa7d812d035a67
Description
After calling swipe.close(), the next swipe starts with a wrong offset.
Steps to reproduce:
- swipe open to the left or right
- click the left or right side item
=> swipe delegate closes - try swiping the same item again
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Controls.Material 2.0 ApplicationWindow { width: 300 height: 400 visible: true ListView { model: 10 anchors.fill: parent delegate: SwipeDelegate { id: delegate text: index width: parent.width swipe.left: Rectangle { width: parent.width height: parent.height color: Material.color(Material.Green, SwipeDelegate.pressed ? Material.Shade700 : Material.Shade500) Label { text: "Left" color: "white" anchors.margins: 10 anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter } SwipeDelegate.onClicked: delegate.swipe.close() // <== } swipe.right: Rectangle { width: parent.width height: parent.height anchors.right: parent.right color: Material.color(Material.Red, SwipeDelegate.pressed ? Material.Shade700 : Material.Shade500) Label { text: "Right" color: "white" anchors.margins: 10 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } SwipeDelegate.onClicked: delegate.swipe.close() // <== } } } }