summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r--mobile-widgets/qml/main.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 6e9b98ce7..930740a93 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -27,6 +27,7 @@ Kirigami.ApplicationWindow {
property alias locationServiceEnabled: manager.locationServiceEnabled
property alias pluggedInDeviceName: manager.pluggedInDeviceName
property alias showPin: prefs.showPin
+ property alias defaultCylinderIndex: settingsWindow.defaultCylinderIndex
onNotificationTextChanged: {
if (notificationText != "") {
// there's a risk that we have a >5 second gap in update events;
@@ -101,7 +102,7 @@ Kirigami.ApplicationWindow {
detailsWindow.cylinderModel2 = manager.cylinderInit
detailsWindow.cylinderModel3 = manager.cylinderInit
detailsWindow.cylinderModel4 = manager.cylinderInit
- detailsWindow.cylinderIndex0 = -1
+ detailsWindow.cylinderIndex0 = general.default_cylinder == "" ? -1 : detailsWindow.cylinderModel0.indexOf(general.default_cylinder)
detailsWindow.usedCyl = ["",]
detailsWindow.weight = ""
detailsWindow.usedGas = []
@@ -371,6 +372,8 @@ if you have network connectivity and want to sync your data to cloud storage."),
text: qsTr("Settings")
onTriggered: {
globalDrawer.close()
+ settingsWindow.defaultCylinderModel = manager.cylinderInit
+ general.default_cylinder === "" ? defaultCylinderIndex = "-1" : defaultCylinderIndex = settingsWindow.defaultCylinderModel.indexOf(general.default_cylinder)
stackView.push(settingsWindow)
detailsWindow.endEditMode()
}
@@ -619,6 +622,10 @@ if you have network connectivity and want to sync your data to cloud storage."),
visible: false
}
+ SsrfGeneralPrefs {
+ id: general
+ }
+
onPluggedInDeviceNameChanged: {
if (detailsWindow.state === 'edit' || detailsWindow.state === 'add') {
/* we're in the middle of editing / adding a dive */