mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Mobile: update the map when the selected dive changes
Now we see the highlighted dive flag match the dive selected in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9a73be9207
commit
fda10b8baa
1 changed files with 8 additions and 0 deletions
|
@ -214,7 +214,15 @@ Kirigami.Page {
|
|||
}
|
||||
|
||||
onCurrentItemChanged: {
|
||||
// why do we do this? What consumes this?
|
||||
manager.selectedDiveTimestamp = currentItem.modelData.dive.timestamp
|
||||
// make sure the core data structures reflect that this dive is selected
|
||||
manager.selectDive(currentItem.modelData.dive.id)
|
||||
// update the map to show the highlighted flag and center on it
|
||||
if (rootItem.pageIndex(mapPage) !== -1) {
|
||||
mapPage.reloadMap()
|
||||
mapPage.centerOnDiveSite(currentItem.modelData.dive.dive_site)
|
||||
}
|
||||
}
|
||||
|
||||
function showDiveIndex(index) {
|
||||
|
|
Loading…
Add table
Reference in a new issue