[Touch-packages] [Bug 1344883] Re: PageHeadSections/Picker: selectedIndex changes incorrectly when inserting/removing model entries

2015-09-07 Thread Sam Bull
** Attachment removed: "test.qml" https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1344883/+attachment/4156880/+files/test.qml -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in Ubuntu.

[Touch-packages] [Bug 1344883] Re: PageHeadSections/Picker: selectedIndex changes incorrectly when inserting/removing model entries

2015-09-07 Thread Sam Bull
OK, the section headers are not the same issue as the picker component. I've attached a new example showing both. With both components set to index 12: After removing item 8, the section header moves to item 13, but the picker jumps to item 7. After removing item 3, the section header moves

[Touch-packages] [Bug 1344883] Re: PageHeadSections/Picker: selectedIndex changes incorrectly when inserting/removing model entries

2015-09-07 Thread Zsombor Egri
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

[Touch-packages] [Bug 1344883] Re: PageHeadSections/Picker: selectedIndex changes incorrectly when inserting/removing model entries

2015-06-14 Thread Zsombor Egri
Your sample code doesn't remove items from the model, but inserts. The behaviour you experience is due to both components using ListView (PathView or GridView behaves the same). When you alter the model, the currentIndex won't necessarily point to the same item was pointing anymore. Removing an