From 41462601476f612d121112221858d3683fe8c19e Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 22 May 2021 13:50:29 +0100 Subject: [PATCH] Misc improvements to DEPARTURE page to correct edge usecases --- Nasal/MCDU/DEPARTURE.nas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nasal/MCDU/DEPARTURE.nas b/Nasal/MCDU/DEPARTURE.nas index 0426577a..a4a1b0b8 100644 --- a/Nasal/MCDU/DEPARTURE.nas +++ b/Nasal/MCDU/DEPARTURE.nas @@ -401,7 +401,6 @@ var departurePage = { } else { me._transitions = me.depAirport[0].getSid(me.selectedSID).transitions; } - me._transitions = me.depAirport[0].getSid(me.selectedSID).transitions; me.transitions = sort(me._transitions,func(a,b) cmp(a,b)); append(me.transitions, "NO TRANS"); @@ -532,10 +531,18 @@ var departurePage = { } }, scrollLeft: func() { + if (me.activePage == 0 and me.selectedRunway == nil) { + mcdu_message(me.computer, "NOT ALLOWED"); + return; + } me.activePage = !me.activePage; me.updatePage(); }, scrollRight: func() { + if (me.activePage == 0 and me.selectedRunway == nil) { + mcdu_message(me.computer, "NOT ALLOWED"); + return; + } me.activePage = !me.activePage; me.updatePage(); },