From 006de0a14c886157f96b5d8fbb7fbd9e21a714f5 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sun, 29 Dec 2024 21:21:46 +0700 Subject: [PATCH] Fix the toaster's stop track action --- src/qml/Legend.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qml/Legend.qml b/src/qml/Legend.qml index 340b4b0ae9..ae98aec222 100644 --- a/src/qml/Legend.qml +++ b/src/qml/Legend.qml @@ -249,7 +249,10 @@ ListView { onClicked: { displayToast(qsTr('This layer is is currently tracking positions.'), 'info', qsTr('Stop'), function () { - trackingModel.stopTracker(VectorLayerPointer); + if (trackingModel.layerInTracking(VectorLayerPointer)) { + trackingModel.stopTracker(VectorLayerPointer); + displayToast(qsTr('Track on layer %1 stopped').arg(VectorLayerPointer.name)); + } }); }