diff --git a/ground/gcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp b/ground/gcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp index da58d44f1..56f6e7206 100644 --- a/ground/gcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp +++ b/ground/gcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp @@ -340,11 +340,9 @@ WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int co WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int const & altitude, QString const & description, const int &position) { internals::PointLatLng mcoord; - bool reloc = false; - if (mcoord == internals::PointLatLng(0, 0)) { + if (coord == internals::PointLatLng(0, 0)) { mcoord = CurrentPosition(); - reloc = true; } else { mcoord = coord; } @@ -353,9 +351,7 @@ WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int co ConnectWP(item); item->setParentItem(map); emit WPInserted(position, item); - if (reloc) { - emit WPValuesChanged(item); - } + emit WPValuesChanged(item); setOverlayOpacity(overlayOpacity); return item; }