From 7a48398d12d3987c57fa7d0a459887d64f4030c2 Mon Sep 17 00:00:00 2001 From: Benoit Eudier Date: Fri, 24 Apr 2015 14:46:53 +0900 Subject: [PATCH] Fixed the load waypoing bug - see description below When you load a waypoint files, the changes you're doing in the waypoint list (for example, changing the longitude of a waypoint) are not applied to the points displayed on the map. This commit fixes this issue. --- src/uas/UASWaypointManager.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index f369948..5a05ec7 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 {