mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile UI: add ability to unset the default cylinder
This was requested in a 'bug report' by a user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
77352751fa
commit
51a242a1db
2 changed files with 8 additions and 1 deletions
|
@ -94,7 +94,12 @@ Kirigami.ScrollablePage {
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText
|
inputMethodHints: Qt.ImhNoPredictiveText
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onActivated: {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1807,6 +1807,8 @@ QStringList QMLManager::cylinderInit() const
|
||||||
|
|
||||||
cylinders.removeDuplicates();
|
cylinders.removeDuplicates();
|
||||||
cylinders.sort();
|
cylinders.sort();
|
||||||
|
// now add fist one that indicates that the user wants no default cylinder
|
||||||
|
cylinders.prepend(tr("no default cylinder"));
|
||||||
return cylinders;
|
return cylinders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue