Browse Source

Merge pull request #1498 from SnoozeTime/master

Fixed the load waypoint bug - points from the list out of sync with points on the map
QGC4.4
Don Gagne 10 years ago
parent
commit
b5d869768c
  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