← Back to team overview

touch-packages team mailing list archive

[Bug 1513933] Re: Page.head.sections.selectedIndex does not reset when changing model

 

I implemented the desired behavior in the attached MR. However, that
conflicts with this bug: https://bugs.launchpad.net/ubuntu/+source
/ubuntu-ui-toolkit/+bug/1511839

Internally, the application header has a single Sections instance, and
when the active Page changes, the PageHeadSections of that Page becomes
active and updates the model of the Sections. That will reset the
selectedIndex to 0. This is not a new problem with the new PageHeader,
because each Page has its own PageHeader, but with the old
PageHeadConfiguration and PageHeadSections the index must be reset to 0
with this behavior.

The solution is to use an old version of Sections in the (old)
application header (configured with Page.head), and to use the new
Sections with PageHeader. The new Sections (use PageHeader) always works
as desired, but when using the Page.head.sections, the index is not
reset to 0 when changing the model. So applications that change the
model and require this behavior need to update the app to make use of
the PageHeader (or implement a workaround where the app sets the new
selectedIndex for Page.head.sections after the model is updated).

-- 
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/1513933

Title:
  Page.head.sections.selectedIndex does not reset when changing model

Status in Canonical System Image:
  Confirmed
Status in ubuntu-ui-toolkit package in Ubuntu:
  In Progress

Bug description:
  Changing Page.head.sections.model does not change the
  Page.head.sections.selectedIndex  even when the model has different
  size.

  I have a page that I need to update the ' Page.head.sections.model '
  dynamically and after change the model or make it empty the
  Page.head.sections.selectedIndex still point to last value used.

  I expect that to reset back to 0 if the model changes.

  Check attached example .

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1513933/+subscriptions


References