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:
parent
d56ac505c4
commit
d7d19649aa
1 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue