Merge lp:~costales/unav/load-main-after-tuto into lp:unav

Proposed by costales
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 21
Merged at revision: 18
Proposed branch: lp:~costales/unav/load-main-after-tuto
Merge into: lp:unav
Diff against target: 58 lines (+7/-8)
2 files modified
qml/Main.qml (+6/-8)
qml/tuto/WelcomeWizard.qml (+1/-0)
To merge this branch: bzr merge lp:~costales/unav/load-main-after-tuto
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan Approve
Review via email: mp+290797@code.launchpad.net

Description of the change

In Nexus 4 rc-proposed the map is white after Tutorial.

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I was able to reproduce a case where the map is visible while viewing the nearby location list. Please apply the following patch to fix the bug,

=== modified file 'qml/Main.qml'
--- qml/Main.qml 2016-04-02 15:01:08 +0000
+++ qml/Main.qml 2016-04-02 15:50:21 +0000
@@ -80,7 +80,7 @@
     PageStack {
         id: mainPageStack

- Component.onCompleted: navApp.settings.showTuto ? mainPageStack.push(Qt.resolvedUrl("tuto/WelcomeWizard.qml")) : push(navigationPage)
+ Component.onCompleted: if (navApp.settings.showTuto) mainPageStack.push(Qt.resolvedUrl("tuto/WelcomeWizard.qml"))// : push(navigationPage)

         property string currentLat: "null"
         property string currentLng: "null"
@@ -111,7 +111,7 @@
         Page {
             id: navigationPage

- visible: mainPageStack.depth !== 1
+ visible: mainPageStack.depth === 0

             property bool buttonsEnabled: false

review: Needs Fixing
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

We can remove push(navigationPage) since it defined inside the pagestack and visible by default. The pages that need pushing to pagestack are only those ones that we push explicitly.

Please remove // push(navigationPage)

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Main.qml'
2--- qml/Main.qml 2016-04-02 07:41:55 +0000
3+++ qml/Main.qml 2016-04-02 16:02:32 +0000
4@@ -45,7 +45,7 @@
5 }
6
7 anchorToKeyboard: true
8-
9+
10 width: units.gu(100)
11 height: units.gu(70)
12
13@@ -80,7 +80,7 @@
14 PageStack {
15 id: mainPageStack
16
17- Component.onCompleted: push(navigationPage)
18+ Component.onCompleted: if (navApp.settings.showTuto) mainPageStack.push(Qt.resolvedUrl("tuto/WelcomeWizard.qml"))
19
20 property string currentLat: "null"
21 property string currentLng: "null"
22@@ -110,9 +110,11 @@
23
24 Page {
25 id: navigationPage
26-
27+
28+ visible: mainPageStack.depth === 0
29+
30 property bool buttonsEnabled: false
31-
32+
33 anchors.fill: parent
34
35 header: PageHeader {
36@@ -348,10 +350,6 @@
37 }
38 catch(e){}
39 }
40- else if (navApp.settings.showTuto) {
41- navApp.settings.showTuto = false;
42- mainPageStack.push(Qt.resolvedUrl("tuto/WelcomeWizard.qml"));
43- }
44 }
45 }
46
47
48=== modified file 'qml/tuto/WelcomeWizard.qml'
49--- qml/tuto/WelcomeWizard.qml 2016-03-26 18:53:17 +0000
50+++ qml/tuto/WelcomeWizard.qml 2016-04-02 16:02:32 +0000
51@@ -22,6 +22,7 @@
52 Walkthrough {
53 id: walkthrough
54 onFinished: {
55+ navApp.settings.showTuto = false;
56 console.log("[LOG]: Welcome tour complete")
57 mainPageStack.pop(walkthrough);
58 }

Subscribers

People subscribed via source and target branches