summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsEdit.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-04 21:53:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-05 08:21:55 -0700
commit3487612337ef0308e3f2129a3193a0f65ac9691c (patch)
tree8bcc2116ee981a99eb897ab8cbf2df6a8db81026 /mobile-widgets/qml/DiveDetailsEdit.qml
parent2dd8a2ad7bb5fbdd263fecd76c0108ad0c44eef0 (diff)
downloadsubsurface-3487612337ef0308e3f2129a3193a0f65ac9691c.tar.gz
QML UI: add transition when switching to edit mode
The hard switch was not ideal. This isn't perfect, yet, but a step in the right direction. The 'transitions' to change the visibility properties are a bit odd, but that's how it's done in the examples as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index 143ebb8d2..25f4596af 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -39,6 +39,7 @@ Item {
property int visibility
function saveData() {
+ diveDetailsPage.state = "view" // run the transition
// apply the changes to the dive_table
manager.commitChanges(dive_id, detailsEdit.dateText, detailsEdit.locationText, detailsEdit.gpsText, detailsEdit.durationText,
detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, suitBox.text, buddyBox.text,
@@ -66,7 +67,6 @@ Item {
diveDetailsListView.currentItem.modelData.notes = detailsEdit.notesText
diveDetailsListView.currentItem.modelData.rating = detailsEdit.rating
diveDetailsListView.currentItem.modelData.visibility = detailsEdit.visibility
- diveDetailsPage.state = "view"
Qt.inputMethod.hide()
// now make sure we directly show the saved dive (this may be a new dive, or it may have moved)
showDiveIndex(newIdx)