diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index f3699489fadc15a7f8baadca3d406312c38fdd27..5a05ec7031295e3195d71d1b72b5abb16bdd6653 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -585,8 +585,11 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile) Waypoint *t = new Waypoint(); if(t->load(in)) { - t->setId(waypointsEditable.count()); - waypointsEditable.insert(waypointsEditable.count(), t); + //Use the existing function to add waypoints to the map instead of doing it manually + //Indeed, we should connect our waypoints to the map in order to synchronize them + //t->setId(waypointsEditable.count()); + // waypointsEditable.insert(waypointsEditable.count(), t); + addWaypointEditable(t, false); } else {