mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <j.bygdell@gmail.com>
This commit is contained in:
parent
bd8eec5c8e
commit
0fb086a4a5
3 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue