summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2022-09-22 22:45:39 +0200
committerMarcus Lundblad <ml@dfupdate.se>2022-09-24 22:21:41 +0200
commit4024ea74cc7f8d8f923438f2827b11899c5f8a0f (patch)
tree84c761c0f0c67c5d7f900065b28ffaf63882af09
parent02200c4d16e77ececd3394d61f600ff6882b1732 (diff)
downloadgnome-maps-4024ea74cc7f8d8f923438f2827b11899c5f8a0f.tar.gz
mapView: Fix removing previous turnpoint marker
Use the proper remove_marker() method to remove the previous marker when showing a new turnpoint.
-rw-r--r--src/mapView.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapView.js b/src/mapView.js
index e6c3c96e..7b267501 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -774,7 +774,7 @@ export class MapView extends Gtk.Overlay {
showTurnPoint(turnPoint) {
if (this._turnPointMarker)
- this._turnPointMarker.destroy();
+ this._instructionMarkerLayer.remove_marker(this._turnPointMarker);
this._turnPointMarker = null;
if (turnPoint.isStop())
@@ -788,7 +788,7 @@ export class MapView extends Gtk.Overlay {
showTransitStop(transitStop, transitLeg) {
if (this._turnPointMarker)
- this._turnPointMarker.destroy();
+ this._instructionMarkerLayer.remove_marker(this._turnPointMarker);
this._turnPointMarker = new TurnPointMarker({ transitStop: transitStop,
transitLeg: transitLeg,