1
0
Fork 0

DeleteWP: don't allow deleting discontinuity that is just after a PPOS

This commit is contained in:
Jonathan Redpath 2022-02-13 10:28:15 +00:00
parent 9675111701
commit b1683b770f

View file

@ -392,10 +392,14 @@ var flightPlanController = {
me.addDiscontinuity(index, n); me.addDiscontinuity(index, n);
} }
} }
} else {
if (me.flightplans[n].getWP(index).id == "DISCONTINUITY" and index > 0 and me.flightplans[n].getWP(index - 1).id == "PPOS") {
return 1;
} else { } else {
me.flightplans[n].deleteWP(index); me.flightplans[n].deleteWP(index);
fmgc.windController.deleteWind(n, index); fmgc.windController.deleteWind(n, index);
} }
}
me.flightPlanChanged(n); me.flightPlanChanged(n);
canvas_nd.A3XXRouteDriver.triggerSignal("fp-removed"); canvas_nd.A3XXRouteDriver.triggerSignal("fp-removed");