From 51a242a1dbe779671ef99ca84552f11576ad600f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 20 Jan 2020 09:29:05 -0800 Subject: mobile UI: add ability to unset the default cylinder This was requested in a 'bug report' by a user. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/Settings.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 1759b8e8a..139adefb4 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -94,7 +94,12 @@ Kirigami.ScrollablePage { inputMethodHints: Qt.ImhNoPredictiveText Layout.fillWidth: true onActivated: { - PrefEquipment.default_cylinder = defaultCylinderBox.currentText + // the entry for 'no default cylinder' is known to be the top, but its text + // is possibly translated so check against the index + if (currentIndex === 0) + PrefEquipment.default_cylinder = "" + else + PrefEquipment.default_cylinder = defaultCylinderBox.currentText } } } -- cgit v1.2.3-70-g09d2