From a38f9ec6c96559efa56e8f7346f74f5990810c3a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 18 Dec 2014 10:20:37 -0600 Subject: Fix flick() with ListView.SnapToItem at bounds. Previously flick() would not always allow flicking to the very end of a ListView if ListView.SnapToItem were set. Stop ListView from adding overshoot, and then incorrectly correcting, if we are flicking exactly to the end of a list. Change-Id: Iad56e433bc1ba7d62f0553c4355469c9861df919 Reviewed-by: Robin Burchell --- .../qquicklistview/data/programmaticFlickAtBounds2.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/auto/quick/qquicklistview/data/programmaticFlickAtBounds2.qml (limited to 'tests/auto/quick/qquicklistview/data') diff --git a/tests/auto/quick/qquicklistview/data/programmaticFlickAtBounds2.qml b/tests/auto/quick/qquicklistview/data/programmaticFlickAtBounds2.qml new file mode 100644 index 0000000000..08870a46b9 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/programmaticFlickAtBounds2.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +ListView { + id: view + width: 200; height: 400 + + snapMode: ListView.SnapToItem + + model: 10 + delegate: Rectangle { + width: 200; height: 50 + color: index % 2 ? "red" : "green" + } +} -- cgit v1.2.3