diff options
Diffstat (limited to 'qt-mobile/qml/DiveDetails.qml')
-rw-r--r-- | qt-mobile/qml/DiveDetails.qml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index c906ba268..a8db2990c 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -74,12 +74,10 @@ MobileComponents.Page { ] */ mainAction: Action { - iconName: state !== "view" ? "dialog-cancel" : "document-edit" + iconName: state !== "view" ? "document-save" : "document-edit" onTriggered: { - if (state === "edit") { - endEditMode() - } else if (state === "add") { - endAddMode() + if (state === "edit" || state === "add") { + detailsEdit.saveData() } else { startEditMode() } @@ -87,10 +85,14 @@ MobileComponents.Page { } onBackRequested: { - if (state === "edit" || state === "add") { - endEditMode(); + if (state === "edit") { + endEditMode() + event.accepted = true; + } else if (state === "add") { + endAddMode() event.accepted = true; } + // if we were in view mode, don't accept the event and pop the page } function showDiveIndex(index) { |