Commit 7a48398d authored by Benoit Eudier's avatar Benoit Eudier
Browse files

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.
parent c3c6d326
...@@ -585,8 +585,11 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile) ...@@ -585,8 +585,11 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile)
Waypoint *t = new Waypoint(); Waypoint *t = new Waypoint();
if(t->load(in)) if(t->load(in))
{ {
t->setId(waypointsEditable.count()); //Use the existing function to add waypoints to the map instead of doing it manually
waypointsEditable.insert(waypointsEditable.count(), t); //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 else
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment