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 Jan 12, 2025
1 parent ef6d1ed commit 5cd2ec5
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 @@ -248,7 +248,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 5cd2ec5

Please sign in to comment.