From 0fb086a4a53dcbd90af01a9faac271d312b485cf Mon Sep 17 00:00:00 2001 From: Jocke Date: Sun, 29 Jul 2018 15:42:56 +0200 Subject: Mobile: fix saving new dive With the new setup we need to know which state we are coming from when we are saving cylinder related info. When we are adding a new dive we explicitly should save cylinder data to the first cylinder. Signed-off-by: Joakim Bygdell --- mobile-widgets/qml/DiveDetailsEdit.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml/DiveDetailsEdit.qml') diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index 91d7a9e23..2faa62d22 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -73,6 +73,7 @@ Item { } function saveData() { + var state = diveDetailsPage.state diveDetailsPage.state = "view" // run the transition // join cylinder info from separate string into a list. if (usedCyl[0] != null) { @@ -114,7 +115,7 @@ Item { detailsEdit.weightText, detailsEdit.notesText, startpressure, endpressure, usedGas, usedCyl , detailsEdit.rating, - detailsEdit.visibility) + detailsEdit.visibility, state) // trigger the profile to be redrawn QMLProfile.diveId = dive_id -- cgit v1.2.3-70-g09d2