On dynamically created pages, head.sections.selectedIndex can't be set to -1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Zoltan Balogh | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Critical
|
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")
}
}
PageStack {
id: stack
}
Component.
}
}
Expected result: a page with no section selected.
What happens: the first section of the header is selected by default
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
-
Diff: 123 lines (+92/-5)3 files modifiedsrc/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+5/-3)
tests/unit_x11/tst_components/tst_pagehead_sections.qml (+3/-2)
tests/unit_x11/tst_components/tst_pagehead_sections_bug1511839.qml (+84/-0)
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 |
tags: | added: regression-proposed |
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 |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
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