Skip to content

Commit

Permalink
Fix the toaster's stop track action
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 30, 2024
1 parent 0f4cd9c commit 006de0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
});
}

Expand Down

0 comments on commit 006de0a

Please sign in to comment.