calling pageStack.pop() in a loop pops too much
Bug #1461729 reported by
Michael Zanetti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Tim Peeters | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
In Ubuntu.Components 1.1 this was working fine to pop everything from a PageStack except the first page:
while (pageStack.depth > 1) {
}
In Ubuntu.Components 1.2 this does no longer work, because it pops the first page too. My suspicion is that it is related to the animation in the header which updates the depth asynchronously.
See the attached file as a standalone example to reproduce. While it works when importing 1.1, it breaks when importing 1.2
Related branches
lp:~tpeeters/ubuntu-ui-toolkit/popLoopBug
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Cris Dywan: Approve
-
Diff: 75 lines (+35/-10)3 files modifiedmodules/Ubuntu/Components/1.2/MainView12.qml (+8/-5)
modules/Ubuntu/Components/1.3/MainView.qml (+8/-5)
tests/unit_x11/tst_components/tst_pagestack.new_header.qml (+19/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Confirmed |
assignee: | nobody → Tim Peeters (tpeeters) |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
Pop() is called repeatedly before the previous page is actually popped, because of the animation.
I think we need to disable all animations, or add a pop(bool immediate) function, or completely make the visuals and pagestack asynchronous, including copying of the Page in memory to avoid showing a Page (that is animating out) when it was already popped from the stack and removed from memory.