mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
QML UI: end edit mode when switching to different page
Fixes #997 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bda0b01216
commit
8813f13bfd
1 changed files with 11 additions and 0 deletions
|
@ -20,6 +20,11 @@ MobileComponents.ApplicationWindow {
|
||||||
visible: false
|
visible: false
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
|
function endEditMode() {
|
||||||
|
detailsWindow.state = "view"
|
||||||
|
// somehow also should deal with the icon for the Action Button
|
||||||
|
}
|
||||||
|
|
||||||
globalDrawer: MobileComponents.GlobalDrawer {
|
globalDrawer: MobileComponents.GlobalDrawer {
|
||||||
title: "Subsurface"
|
title: "Subsurface"
|
||||||
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
|
||||||
|
@ -32,18 +37,21 @@ MobileComponents.ApplicationWindow {
|
||||||
for (var i=stackView.depth; i>1; i--) {
|
for (var i=stackView.depth; i>1; i--) {
|
||||||
stackView.pop()
|
stackView.pop()
|
||||||
}
|
}
|
||||||
|
endEditMode()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
text: "Cloud credentials"
|
text: "Cloud credentials"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(cloudCredWindow)
|
stackView.push(cloudCredWindow)
|
||||||
|
endEditMode()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
text: "Preferences"
|
text: "Preferences"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
stackView.push(prefsWindow)
|
stackView.push(prefsWindow)
|
||||||
|
endEditMode()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MobileComponents.ActionGroup {
|
MobileComponents.ActionGroup {
|
||||||
|
@ -51,6 +59,7 @@ MobileComponents.ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Download from computer"
|
text: "Download from computer"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
endEditMode()
|
||||||
stackView.push(downloadDivesWindow)
|
stackView.push(downloadDivesWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,12 +86,14 @@ MobileComponents.ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Refresh"
|
text: "Refresh"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
endEditMode()
|
||||||
manager.loadDives();
|
manager.loadDives();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
text: "Upload to cloud"
|
text: "Upload to cloud"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
endEditMode()
|
||||||
manager.saveChanges();
|
manager.saveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue