mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move endEditMode() to DiveDetails.qml
Having endEditMode() in main.qml seemed wrong somehow. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d976310094
commit
47403588e5
3 changed files with 14 additions and 15 deletions
|
|
@ -20,11 +20,6 @@ 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"
|
||||
|
|
@ -37,21 +32,21 @@ MobileComponents.ApplicationWindow {
|
|||
for (var i=stackView.depth; i>1; i--) {
|
||||
stackView.pop()
|
||||
}
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
}
|
||||
},
|
||||
Action {
|
||||
text: "Cloud credentials"
|
||||
onTriggered: {
|
||||
stackView.push(cloudCredWindow)
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
}
|
||||
},
|
||||
Action {
|
||||
text: "Preferences"
|
||||
onTriggered: {
|
||||
stackView.push(prefsWindow)
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
}
|
||||
},
|
||||
MobileComponents.ActionGroup {
|
||||
|
|
@ -61,7 +56,7 @@ MobileComponents.ApplicationWindow {
|
|||
Action {
|
||||
text: "Download from computer"
|
||||
onTriggered: {
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
stackView.push(downloadDivesWindow)
|
||||
}
|
||||
}
|
||||
|
|
@ -89,14 +84,14 @@ MobileComponents.ApplicationWindow {
|
|||
Action {
|
||||
text: "Refresh"
|
||||
onTriggered: {
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
manager.loadDives();
|
||||
}
|
||||
}
|
||||
Action {
|
||||
text: "Upload to cloud"
|
||||
onTriggered: {
|
||||
endEditMode()
|
||||
detailsWindow.endEditMode()
|
||||
manager.saveChanges();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue