mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: close all other pages when switching cloud credentials
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5e3b2741ac
commit
36b089dc8c
1 changed files with 9 additions and 5 deletions
|
@ -21,6 +21,13 @@ MobileComponents.ApplicationWindow {
|
||||||
visible: false
|
visible: false
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
|
function returnTopPage() {
|
||||||
|
for (var i=stackView.depth; i>1; i--) {
|
||||||
|
stackView.pop()
|
||||||
|
}
|
||||||
|
detailsWindow.endEditMode()
|
||||||
|
}
|
||||||
|
|
||||||
globalDrawer: MobileComponents.GlobalDrawer {
|
globalDrawer: MobileComponents.GlobalDrawer {
|
||||||
title: "Subsurface"
|
title: "Subsurface"
|
||||||
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
|
@ -30,16 +37,13 @@ MobileComponents.ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Dive list"
|
text: "Dive list"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
for (var i=stackView.depth; i>1; i--) {
|
returnTopPage()
|
||||||
stackView.pop()
|
|
||||||
}
|
|
||||||
detailsWindow.endEditMode()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
text: "Cloud credentials"
|
text: "Cloud credentials"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
detailsWindow.endEditMode()
|
returnTopPage()
|
||||||
oldStatus = manager.credentialStatus
|
oldStatus = manager.credentialStatus
|
||||||
if (diveList.numDives > 0) {
|
if (diveList.numDives > 0) {
|
||||||
manager.startPageText = "Enter different credentials or return to dive list"
|
manager.startPageText = "Enter different credentials or return to dive list"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue