On dynamically created pages, head.sections.selectedIndex can't be set to -1

Bug #1511839 reported by Gustavo Pichorim Boiko on 2015-10-30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Zoltan Balogh
ubuntu-ui-toolkit (Ubuntu)
Zsombor Egri

Bug Description

Ubuntu.Components version: 1.3

Some times it is desirable that none of the entries in the head.sections.model is selected by default.
While that works fine on statically created pages, if I define a page inside a component, or load it directly from a QML file, this is not respected.

The following sample QML application reproduces the problem:

import QtQuick 2.3
import Ubuntu.Components 1.3

MainView {
    width: units.gu(30)
    height: units.gu(60)
    Component {
        id: pageComponent
        Page {
            id: page
            title: i18n.tr("The Page")
            head.sections.model: ["one","two","three"]
            head.sections.selectedIndex: -1

    PageStack {
        id: stack

    Component.onCompleted: {

Expected result: a page with no section selected.
What happens: the first section of the header is selected by default

Related branches

Bill Filler (bfiller) on 2015-10-30
Changed in canonical-devices-system-image:
assignee: nobody → Zoltan Balogh (bzoltan)
milestone: none → ww46-2015
importance: Undecided → High
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → High
Gustavo Pichorim Boiko (boiko) wrote :

Just as a note, this bug is actually a regression, since this used to work fine in previous versions of UITK.

Messaging-app is affected by this problem: although visually it looks like the first SIM card is selected, when the user presses the "Send" button he gets a message saying that no SIM card was selected

Bill Filler (bfiller) wrote :

This introduces a bad bug in dialer-app when you have dual sim. It appears SIM1 is selected but it is really not and there is no way to select it.

tags: added: regression-proposed
Zsombor Egri (zsombi) wrote :

Raised to critical as blocks migration to 1.3.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → In Progress
assignee: Zoltan Balogh (bzoltan) → Zsombor Egri (zsombi)
importance: High → Critical
Zsombor Egri (zsombi) on 2015-11-02
Changed in canonical-devices-system-image:
status: New → In Progress
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.1705+16.04.20151103-0ubuntu1

ubuntu-ui-toolkit (1.3.1705+16.04.20151103-0ubuntu1) xenial; urgency=medium

  [ Zsombor Egri ]
  * Fix Sections sync with PageHeadSections selectedIndex changes. (LP:

 -- Zoltan Balogh <email address hidden> Tue, 03 Nov 2015 11:16:12 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers