From b1683b770f880b0b14de8171ddd1646add2a29e0 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 13 Feb 2022 10:28:15 +0000 Subject: [PATCH] DeleteWP: don't allow deleting discontinuity that is just after a PPOS --- Nasal/FMGC/flightplan.nas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index 6cedd92d..9e8cade1 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -393,8 +393,12 @@ var flightPlanController = { } } } else { - me.flightplans[n].deleteWP(index); - fmgc.windController.deleteWind(n, index); + if (me.flightplans[n].getWP(index).id == "DISCONTINUITY" and index > 0 and me.flightplans[n].getWP(index - 1).id == "PPOS") { + return 1; + } else { + me.flightplans[n].deleteWP(index); + fmgc.windController.deleteWind(n, index); + } } me.flightPlanChanged(n);