diff --git a/gui/dialogs/airports.xml b/gui/dialogs/airports.xml
index 1c3eb78bd..59a5dd1ec 100644
--- a/gui/dialogs/airports.xml
+++ b/gui/dialogs/airports.xml
@@ -10,12 +10,86 @@
+
+
+ var id = "";
+ var node = props.globals.getNode("/sim/gui/dialogs/airports", 1);
+ if (node.getNode("list") == nil) {
+ node.getNode("list", 1).setValue("");
+ }
+ node = node.getNode("list");
+
+ listbox = func {
+ id = pop(split(" ", node.getValue()));
+ id = substr(id, 1, size(id) - 2); # strip parentheses
+ }
+
+ apply = func {
+ setprop("/sim/presets/airport-id", id);
+ setprop("/sim/presets/longitude-deg", -9999);
+ setprop("/sim/presets/latitude-deg", -9999);
+ setprop("/sim/presets/altitude-ft", -9999);
+ setprop("/sim/presets/airspeed-kt", 0);
+ setprop("/sim/presets/offset-distance", 0);
+ setprop("/sim/presets/offset-azimuth", 0);
+ setprop("/sim/presets/glideslope-deg", 0);
+ setprop("/sim/presets/heading-deg", 0);
+ setprop("/sim/presets/runway", "");
+ }
+
+
+
+ airport-list
440
360
- /sim/presets/airport-id
+ /sim/gui/dialogs/airports/list
+
+ dialog-apply
+ airport-list
+
+
+ nasal
+
+
+
+ hbox
+ 4
+
+
+
+ 60
+
+
+
+ input
+ 280
+ /sim/gui/dialogs/airports/list
+
+ dialog-apply
+ input
+
+
+ dialog-update
+ airport-list
+
+
+
+
+
+
hbox
10
@@ -26,28 +100,16 @@
true
true
- nasal
-
+ dialog-apply
+ airport-list
- dialog-apply
+ nasal
+
presets-commit
-
- dialog-close
-
true
@@ -56,6 +118,10 @@
true
Esc
+
+ dialog-apply
+ input
+
dialog-close