Merge lp:~gcollura/ubuntu-ui-toolkit/fix-1341814-and-1400297 into lp:ubuntu-ui-toolkit

Proposed by Giulio Collura
Status: Superseded
Proposed branch: lp:~gcollura/ubuntu-ui-toolkit/fix-1341814-and-1400297
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 23 lines (+11/-0)
1 file modified
modules/Ubuntu/Components/PageHeadConfiguration.qml (+11/-0)
To merge this branch: bzr merge lp:~gcollura/ubuntu-ui-toolkit/fix-1341814-and-1400297
Reviewer Review Type Date Requested Status
Zoltan Balogh Needs Fixing
Riccardo Padovani (community) Approve
Review via email: mp+245429@code.launchpad.net

This proposal has been superseded by a proposal from 2015-01-05.

Commit message

Fix bug #1341814, bug #1400297. Remove the parent of the previously displayed contents in pagehead.

Description of the change

This is a bugfix for bug #1341814 and bug #1400297. Essentially we have to force the removal of the previous 'contents' item by removing its parent. This way we ensure that the contents are correctly hidden, focused and removed, without destroying them.

To post a comment you must log in.
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Tested on desktop on vivid, it fixes both bugs.

Thanks Giulio!

review: Approve
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Would you please target this MR to the staging branch? (lp:ubuntu-ui-toolkit/staging)

review: Needs Fixing

Unmerged revisions

1150. By Giulio Collura

Fix bug #1341814 and #1400297 by forcing the previous displayed contents to lose their parent

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/PageHeadConfiguration.qml'
2--- modules/Ubuntu/Components/PageHeadConfiguration.qml 2014-10-31 13:36:50 +0000
3+++ modules/Ubuntu/Components/PageHeadConfiguration.qml 2014-12-29 17:34:33 +0000
4@@ -94,8 +94,19 @@
5 See \l PageHeadState for an example that shows how search mode can
6 be implemented.
7 */
8+ property Item __oldContents: null
9 property Item contents: null
10
11+ onContentsChanged: {
12+ if (__oldContents) {
13+ // FIX: bug #1341814 and #1400297
14+ // We have to force the removal of the previous head.contents
15+ // in order to show the new contents
16+ __oldContents.parent = null
17+ }
18+ __oldContents = contents;
19+ }
20+
21 // FIXME: The example below can be much simplified using PageHeadState
22 // when bug #1345775 has been fixed.
23 /*!

Subscribers

People subscribed via source and target branches

to status/vote changes: