mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:33:24 +00:00
QML UI: show dive site on map with left action on dive details page
The icon isn't great, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c6dbbe1aac
commit
a807a5e8cd
1 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,7 @@ Kirigami.Page {
|
|||
target: diveDetailsPage;
|
||||
actions {
|
||||
right: deleteAction
|
||||
left: diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null
|
||||
}
|
||||
}
|
||||
PropertyChanges { target: detailsEditScroll; opened: false }
|
||||
|
@ -73,6 +74,14 @@ Kirigami.Page {
|
|||
}
|
||||
}
|
||||
|
||||
property QtObject mapAction: Action {
|
||||
text: "Show on map"
|
||||
iconName: "gps"
|
||||
onTriggered: {
|
||||
showMap(diveDetailsListView.currentItem.modelData.dive.gps)
|
||||
}
|
||||
}
|
||||
|
||||
actions.main: Action {
|
||||
iconName: state !== "view" ? "document-save" : "document-edit"
|
||||
onTriggered: {
|
||||
|
|
Loading…
Add table
Reference in a new issue