diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2016-08-29 21:35:06 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-04 07:36:43 -0700 |
commit | 4e0200863b876d3dab750711bfe1c8facba94f55 (patch) | |
tree | 3274c638045ca1c8dabff2d60e8ef2a2731a68db /mobile-widgets/qml | |
parent | 674d8331f5c15a8c3095afd1deca2b087fd82464 (diff) | |
download | subsurface-4e0200863b876d3dab750711bfe1c8facba94f55.tar.gz |
Remove hacks regarding multiple gasmixes and cylinders
Enabling cylinder edit in Subsurface-mobile our previous hacks
regarding multiple cylinders and gasmixes must be removed.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 15 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveDetailsEdit.qml | 3 |
2 files changed, 4 insertions, 14 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index b85b59391..7f6ca81a0 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -166,17 +166,10 @@ Kirigami.Page { // careful when translating, this text is "magic" in DiveDetailsEdit.qml weight = "cannot edit multiple weight systems" } - 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 - cylinderIndex = diveDetailsListView.currentItem.modelData.dive.cylinderList.indexOf(diveDetailsListView.currentItem.modelData.dive.getCylinder) - } 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" - } + startpressure = diveDetailsListView.currentItem.modelData.dive.startPressure + endpressure = diveDetailsListView.currentItem.modelData.dive.endPressure + gasmix = diveDetailsListView.currentItem.modelData.dive.firstGas + cylinderIndex = diveDetailsListView.currentItem.modelData.dive.cylinderList.indexOf(diveDetailsListView.currentItem.modelData.dive.getCylinder) diveDetailsPage.state = "edit" } diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index b3907c616..6ab2978f0 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -232,7 +232,6 @@ Item { } StyledTextField { id: txtGasMix - fixed: (text == "cannot edit multiple gases" ? true : false) Layout.fillWidth: true validator: RegExpValidator { regExp: /(EAN100|EAN\d\d|AIR|100|\d{1,2}|\d{1,2}\/\d{1,2})/i } } @@ -243,7 +242,6 @@ Item { } StyledTextField { id: txtStartPressure - fixed: (text == "cannot edit multiple cylinders" ? true : false) Layout.fillWidth: true } @@ -253,7 +251,6 @@ Item { } StyledTextField { id: txtEndPressure - readOnly: (text == "cannot edit multiple cylinders" ? true : false) Layout.fillWidth: true } |