Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.3.0
-
None
Description
Warning: this is a quite specific situation where all the parameters set matter.
By default when inserting an item at index 'ListView.currentIndex', a ListView with highlightRangeMode: ListView.StrictlyEnforceRange will move the items to position the newly introduced one at the beginning.
When additionally setting ListView.snapMode to ListView.SnapOneItem, that behaviour is changed and the items do not move anylonger upon insertion even though the currentIndex is still adequately updated.
Setting the currentIndex manually after that leads to the view animating to the desired index but by first instantly moving the viewport to the position it should have been in if snapMode had not been breaking the behaviour.
See attached example program. Try it with and without snapMode set and observe the visual difference.