LocationChooser: Add a "Re-center" action to find the pinned location
It's somewhat easy to scroll or pan away from the pin you placed, so let's add an action to re-center the map if you want to find it again.
This commit is contained in:
@@ -30,6 +30,12 @@ Components.AbstractMaximizeComponent {
|
|||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
enabled: !!root.location
|
enabled: !!root.location
|
||||||
|
},
|
||||||
|
Kirigami.Action {
|
||||||
|
text: i18nc("@action:intoolbar Re-center the map onto the set location", "Re-Center")
|
||||||
|
icon.name: "snap-bounding-box-center-symbolic"
|
||||||
|
onTriggered: mapView.map.fitViewportToMapItems([mapView.locationMapItem])
|
||||||
|
enabled: root.location !== undefined
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user