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 to item 13, whereas the 
picker remains on item 12.

I can't test this with a ListView directly, as it does not have a selectedIndex.
So, the picker jumps down to the deleted item on some indices and remains 
pointing at the correct item on others.
I've registered a separate bug for the off by one behaviour of the section 
header (bug #1493040).

** Attachment added: "test.qml"
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1344883/+attachment/4458731/+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.
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     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to