aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetails.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qml/DiveDetails.qml')
-rw-r--r--qt-mobile/qml/DiveDetails.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml
index 7fc2a8be9..162e31b9d 100644
--- a/qt-mobile/qml/DiveDetails.qml
+++ b/qt-mobile/qml/DiveDetails.qml
@@ -59,6 +59,13 @@ MobileComponents.Page {
}
}
+ onBackRequested: {
+ if (state === "edit" || state === "add") {
+ endEditMode();
+ event.accepted = true;
+ }
+ }
+
function showDiveIndex(index) {
currentIndex = index;
diveDetailsListView.positionViewAtIndex(index, ListView.Beginning);