Skip to content

Commit

Permalink
Show NO TRANS when explicitly selected
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueberryKing committed Apr 16, 2024
1 parent 26c6788 commit f6a8905
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ class CDUAvailableArrivalsPage {
const selectedTransition = targetPlan.arrivalEnrouteTransition;
const availableTransitions = selectedArrival.enrouteTransitions;

if (availableTransitions.length === 0 || selectedTransition === null) {
selectedTransitionCell = "NONE";
selectedTransitionCellColor = flightPlanAccentColor;
} else if (selectedTransition) {
if (selectedTransition) {
selectedTransitionCell = selectedTransition.ident;
selectedTransitionCellColor = flightPlanAccentColor;
} else if (selectedTransition === null) {
selectedTransitionCell = Labels.NO_TRANS;
selectedTransitionCellColor = flightPlanAccentColor;
} else if (availableTransitions.length === 0) {
selectedTransitionCell = "NONE";
selectedTransitionCellColor = flightPlanAccentColor;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ class CDUAvailableDeparturesPage {
}
}

// TODO This is the same thing 3 times in a row?

if (selectedSid) {
selectedSidCell = selectedSid.ident;
selectedSidCellColor = selectedColour;

if (selectedTransition) {
selectedTransCell = selectedTransition.ident;
selectedTransCellColor = selectedColour;
} else if (availableTransitions.length === 0 || selectedTransition === null) {
} else if (selectedTransition === null) {
selectedTransCell = Labels.NO_TRANS;
selectedTransCellColor = selectedColour;
} else if (availableTransitions.length === 0) {
selectedTransCell = "NONE";
selectedTransCellColor = selectedColour;
}
Expand Down

0 comments on commit f6a8905

Please sign in to comment.