Header and tools not updated when popping a page from the stack

Bug #1225079 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
High
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
Undecided
Unassigned

Bug Description

I’m attaching a QML file that demonstrates the issue. To reproduce:

 1) open the attached file with qmlscene: qmlscene test.qml
 2) observe that there is a toolbar with one button, and that the header reads "page 1"
 3) click the button that reads "go to page 2"
 4) observe that the title changed to "page 2", the background color is now green, there is no toolbar, and there is a button in the center of the page ("return to page 1")
 5) click on that button

Expected result: back to page 1, the header reads "page 1" and there is a toolbar.
Current result: back to page 1, but the header still reads "page 2", and the toolbar is not there.

Tags: header

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

As a side note, I uncovered this bug while trying to migrate the webbrowser-app code over to using the standard Toolbar from the UITK, instead of a custom Panel. This is blocking me in this migration.

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Tim Peeters (tpeeters)
Tim Peeters (tpeeters)
tags: added: header
Revision history for this message
Tim Peeters (tpeeters) wrote :

The example code is incorrect. Page 1 is never pushed on the PageStack, so it does not become active after popping page 2. Initially it happens to be visible because it is like any item in the PageStack.

Although it is not a bug in UITK, it is easy enough to make this mistake, so I link the bug to a branch where I am making Pages inside PageStack not visible by default (that will also make it possible to define several Pages inside PageStack so that they can be pushed later, without explicitly setting them to be not visible and not active initially).

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
Tim Peeters (tpeeters) wrote :

I changed the proposed MR not to change the default visibility of pages inside PageStack. So the page will still be visible, but do not assume that it is on the PageStack when it was not pushed there.

Previously, even if the Page was not pushed, still it could set the header. This is no longer the case with the attached MR so that will avoid some confusion.

Changed in ubuntu-ui-toolkit:
status: In Progress → Invalid
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging at revision 1048, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: Invalid → Fix Committed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.