ListView has currentIndex, which is the selected one. Picker.selectedIndex works with that property as well. Then Sections.selectedIndex is not interacting with any ListView or such, so that works a bit differently, it always moves to the last item in the model when changes afaik.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in Ubuntu. https://bugs.launchpad.net/bugs/1344883 Title: PageHeadSections/Picker: selectedIndex changes incorrectly when inserting/removing model entries Status in ubuntu-ui-toolkit package in Ubuntu: Triaged Bug description: I've attached a minimal program to demonstrate the problem. The Model contains 20 items, and the selectedIndex is at 18. Clicking the button below will remove the item at index 10. Expected behaviour: Picker keeps number 18 selected. Actual behaviour: Picker jumps to number 9, the index before the one just deleted. Observe that when changing the button code to remove index 3 instead of 10, the picker works correctly, and remains at item 18. The behaviour only breaks on some index removals. inserts appear to behave correctly. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1344883/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp