Browse Source

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.
QGC4.4
Benoit Eudier 10 years ago
parent
commit
7a48398d12
  1. 7
      src/uas/UASWaypointManager.cc

7
src/uas/UASWaypointManager.cc

@ -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
{ {

Loading…
Cancel
Save