summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-10 21:47:09 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-10 21:47:09 -0800
commit36b089dc8c54916b6f9e1e8a9dfaaa6254afd071 (patch)
tree8cc0bbb653e1c25841be85f64d9ac1b51f20f0af /qt-mobile
parent5e3b2741acd06b4ed8d9c2d8c3ca76080cfed51b (diff)
downloadsubsurface-36b089dc8c54916b6f9e1e8a9dfaaa6254afd071.tar.gz
QML UI: close all other pages when switching cloud credentials
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/main.qml14
1 files changed, 9 insertions, 5 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 657158068..2c066e242 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -21,6 +21,13 @@ MobileComponents.ApplicationWindow {
visible: false
opacity: 0
+ function returnTopPage() {
+ for (var i=stackView.depth; i>1; i--) {
+ stackView.pop()
+ }
+ detailsWindow.endEditMode()
+ }
+
globalDrawer: MobileComponents.GlobalDrawer {
title: "Subsurface"
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
@@ -30,16 +37,13 @@ MobileComponents.ApplicationWindow {
Action {
text: "Dive list"
onTriggered: {
- for (var i=stackView.depth; i>1; i--) {
- stackView.pop()
- }
- detailsWindow.endEditMode()
+ returnTopPage()
}
},
Action {
text: "Cloud credentials"
onTriggered: {
- detailsWindow.endEditMode()
+ returnTopPage()
oldStatus = manager.credentialStatus
if (diveList.numDives > 0) {
manager.startPageText = "Enter different credentials or return to dive list"