mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mapwidgethelper: pass a MapLocation object to QML in centerOnDiveSite()
The function in QML centerOnCoordinate() is now renamed centerOnMapLocation() and accepts a MapLocation object, so that a marker is selected (based on UUID). In MapWidgetHelper::centerOnDiveSite(), the pointer to a MapLocation is retrieved via MapLocationModel::getMapLocationForUuid(). Added in the previous commit. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
4a126b553f
commit
b4740803a1
2 changed files with 5 additions and 7 deletions
|
@ -70,10 +70,11 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
function centerOnCoordinate(coordinate) {
|
||||
map.newCenter = coordinate;
|
||||
function centerOnMapLocation(mapLocation) {
|
||||
map.newCenter = mapLocation.coordinate;
|
||||
map.zoomLevel = 2;
|
||||
mapAnimation.restart();
|
||||
mapHelper.model.selectedUuid = mapLocation.uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue