From 4cdb08efe01c8f35afa63af90dfc4d85ff8caa6a Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 19 Sep 2017 17:54:00 +0100 Subject: [PATCH] Fix explicit runway selection after automatic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clear / set the ‘runway requested’ flag to fix selection from the airport dialog --- gui/dialogs/airports.xml | 2 ++ gui/dialogs/location-in-air.xml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/dialogs/airports.xml b/gui/dialogs/airports.xml index d73aa9714..a6a5c7e21 100644 --- a/gui/dialogs/airports.xml +++ b/gui/dialogs/airports.xml @@ -233,9 +233,11 @@ if (mode["bestrunway"].getBoolValue()) { setprop("/sim/presets/runway", ""); setprop("/sim/presets/parkpos", ""); + setprop("/sim/presets/runway-requested", 0); } else if (mode["runway"].getBoolValue()) { setprop("/sim/presets/runway", getprop("/sim/gui/dialogs/airports/selected-airport/rwy")); setprop("/sim/presets/parkpos", ""); + setprop("/sim/presets/runway-requested", 1); } else { setprop("/sim/presets/runway", ""); setprop("/sim/presets/parkpos", getprop("/sim/gui/dialogs/airports/selected-airport/parkpos")); diff --git a/gui/dialogs/location-in-air.xml b/gui/dialogs/location-in-air.xml index 85151d5dc..269b0413d 100644 --- a/gui/dialogs/location-in-air.xml +++ b/gui/dialogs/location-in-air.xml @@ -42,7 +42,7 @@ } setprop(propname, found[0].id); setprop(freqpropname, found[0].frequency / 100.0); - + } @@ -351,6 +351,12 @@ if (!mode.airport.getBoolValue()) { setprop("/sim/presets/airport-id", ""); setprop("/sim/presets/runway", ""); + setprop("/sim/presets/runway-requested", 0); + } else { + var runway = getprop("/sim/presets/runway"); + if (runway != "") { + setprop("/sim/presets/runway-requested", 1); + } } if (!mode.lonlat.getBoolValue()) {