mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: enable edit of gasmix
First cylinder only, show warning if there are more than one cylinder defined. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8cc4463a1a
commit
ae116c5bc8
5 changed files with 25 additions and 3 deletions
|
|
@ -24,6 +24,7 @@ MobileComponents.Page {
|
|||
property alias weight: detailsEdit.weightText
|
||||
property alias startpressure: detailsEdit.startpressureText
|
||||
property alias endpressure: detailsEdit.endpressureText
|
||||
property alias gasmix: detailsEdit.gasmixText
|
||||
|
||||
state: "view"
|
||||
|
||||
|
|
@ -128,10 +129,12 @@ MobileComponents.Page {
|
|||
if (diveDetailsListView.currentItem.modelData.dive.getCylinder != "Multiple" ) {
|
||||
startpressure = diveDetailsListView.currentItem.modelData.dive.startPressure
|
||||
endpressure = diveDetailsListView.currentItem.modelData.dive.endPressure
|
||||
gasmix = diveDetailsListView.currentItem.modelData.dive.firstGas
|
||||
} else {
|
||||
// careful when translating, this text is "magic" in DiveDetailsEdit.qml
|
||||
startpressure = "cannot edit multiple cylinders"
|
||||
endpressure = "cannot edit multiple cylinders"
|
||||
gasmix = "cannot edit multiple gases"
|
||||
}
|
||||
|
||||
diveDetailsPage.state = "edit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue