1
0
Fork 0

Fix a stupid logic bug when re-ordering waypoints.

http://code.google.com/p/flightgear-bugs/issues/detail?id=870
This commit is contained in:
James Turner 2012-09-21 12:47:51 +01:00
parent d56ac505c4
commit d7d19649aa

View file

@ -90,11 +90,10 @@ public:
--destIndex;
}
unsigned int currentWpIndex = currentWaypoint();
WayptRef w(waypointAt(currentWpIndex));
_fp->deleteIndex(currentWpIndex);
int currentWpIndex = currentWaypoint();
SG_LOG(SG_GENERAL, SG_INFO, "wpt:" << w->ident());
WayptRef w = _fp->legAtIndex(srcIndex)->waypoint();
_fp->deleteIndex(srcIndex);
_fp->insertWayptAtIndex(w, destIndex);
if (srcIndex == currentWpIndex) {