diff options
author | Alberto Mardegan <info@mardy.it> | 2015-07-11 15:24:53 +0300 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-07-20 19:30:43 +0000 |
commit | 134d980a7fcf61c5440019bcfb3fdfc39c3f5f3c (patch) | |
tree | 4057dc82065edfaea18d7bc8f13d523b31e2b0f0 /tests/auto/quick/qquicklistview/data | |
parent | 49874ec12a821c165ab31ec90d98eb5c4dec30dc (diff) |
Don't change the currentItem after a viewport resize
When highlightRangeMode is set to StrictlyEnforceRange and the view gets
resized, we don't want the currentIndex to change.
The code touched by this patch was introduced by commit
I08b7e61496a79f71c3b40fafaca985ae90f88503 back in Qt 4.7 times, and
never changed since then.
Task-number: QTBUG-43555
Change-Id: Ie67faa6898f13a1f7b0f1c4ae6c29721cb7dfa41
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tests/auto/quick/qquicklistview/data')
-rw-r--r-- | tests/auto/quick/qquicklistview/data/snapOneItemResize.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/snapOneItemResize.qml b/tests/auto/quick/qquicklistview/data/snapOneItemResize.qml new file mode 100644 index 0000000000..7ecc833a64 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/snapOneItemResize.qml @@ -0,0 +1,16 @@ +import QtQuick 2.0 + +ListView { + id: list + currentIndex: 5 + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + highlightRangeMode: ListView.StrictlyEnforceRange + highlightFollowsCurrentItem: true + model: 10 + spacing: 10 + delegate: Item { + width: ListView.view.width + height: ListView.view.height + } +} |