aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-27 19:05:13 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-27 19:05:13 -0800
commit8813f13bfdf8269c6933d43c871a6660ce8ed35c (patch)
tree13f16dde2095a9a3f4739b9680c1ddc7f78e19e5 /qt-mobile/qml
parentbda0b0121673d71235dcb05bdc835a91ffb5090d (diff)
downloadsubsurface-8813f13bfdf8269c6933d43c871a6660ce8ed35c.tar.gz
QML UI: end edit mode when switching to different page
Fixes #997 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r--qt-mobile/qml/main.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 4422d5b07..6762676f9 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -20,6 +20,11 @@ MobileComponents.ApplicationWindow {
visible: false
opacity: 0
+ function endEditMode() {
+ detailsWindow.state = "view"
+ // somehow also should deal with the icon for the Action Button
+ }
+
globalDrawer: MobileComponents.GlobalDrawer {
title: "Subsurface"
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
@@ -32,18 +37,21 @@ MobileComponents.ApplicationWindow {
for (var i=stackView.depth; i>1; i--) {
stackView.pop()
}
+ endEditMode()
}
},
Action {
text: "Cloud credentials"
onTriggered: {
stackView.push(cloudCredWindow)
+ endEditMode()
}
},
Action {
text: "Preferences"
onTriggered: {
stackView.push(prefsWindow)
+ endEditMode()
}
},
MobileComponents.ActionGroup {
@@ -51,6 +59,7 @@ MobileComponents.ApplicationWindow {
Action {
text: "Download from computer"
onTriggered: {
+ endEditMode()
stackView.push(downloadDivesWindow)
}
}
@@ -77,12 +86,14 @@ MobileComponents.ApplicationWindow {
Action {
text: "Refresh"
onTriggered: {
+ endEditMode()
manager.loadDives();
}
}
Action {
text: "Upload to cloud"
onTriggered: {
+ endEditMode()
manager.saveChanges();
}
}