From 4f4b10e0b6169ebdbad507758f681e2f61253539 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 1 Sep 2024 12:40:44 -0400 Subject: [PATCH] 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. --- src/qml/LocationChooser.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qml/LocationChooser.qml b/src/qml/LocationChooser.qml index 38336a60c..7138585d8 100644 --- a/src/qml/LocationChooser.qml +++ b/src/qml/LocationChooser.qml @@ -30,6 +30,12 @@ Components.AbstractMaximizeComponent { root.close(); } 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 } ]