=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2015-02-15 15:05:43 +0000
+++ app/ui/HomePage.qml 2015-02-15 15:34:32 +0000
@@ -69,13 +69,32 @@
// TODO with snapMode, currentIndex is not properly set and setting currentIndex fails
//snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- currentIndex: settings.current
highlightMoveDuration: 150
highlightRangeMode: ListView.StrictlyEnforceRange
onCurrentIndexChanged: {
print("CI: "+currentIndex)
+
+ if (loaded) {
+ settings.current = currentIndex
+ }
+ }
+ onModelChanged: {
+ currentIndex = settings.current
+
+ if (model > 0) {
+ loaded = true
+ }
}
delegate: LocationPane {}
+
+ property bool loaded: false
+
+ Connections {
+ target: settings
+ onCurrentChanged: {
+ locationPages.currentIndex = settings.current
+ }
+ }
}
}
}