Ubuntu Pastebin

Paste from ahayzen at Sun, 15 Feb 2015 15:00:45 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml	2015-02-14 17:48:55 +0000
+++ app/ubuntu-weather-app.qml	2015-02-15 15:00:18 +0000
@@ -48,11 +48,6 @@
     property var locationsList: []
 
     /*
-      Index of the current locationList of locations and their data, accessible through index
-    */
-    property int current: 0
-
-    /*
       Index of Location before a refresh, to go back after
     */
     property int indexAtRefresh: -1
@@ -117,6 +112,11 @@
         id: settings
         category: "weatherSettings"
 
+        /*
+          Index of the current locationList of locations and their data, accessible through index
+        */
+        property int current: 0
+
         property int refreshInterval: 1800
         property string precipUnits
         property string service

=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml	2015-02-15 14:01:32 +0000
+++ app/ui/HomePage.qml	2015-02-15 15:00:27 +0000
@@ -69,7 +69,7 @@
             // TODO with snapMode, currentIndex is not properly set and setting currentIndex fails
             //snapMode: ListView.SnapOneItem
             orientation: ListView.Horizontal
-            currentIndex: weatherApp.current
+            currentIndex: settings.current
             highlightMoveDuration: 150
             highlightRangeMode: ListView.StrictlyEnforceRange
             onCurrentIndexChanged: {
Download as text