diff --git a/gui/dialogs/weather_scenario.xml b/gui/dialogs/weather_scenario.xml index 4361ed97f..f1c08bede 100644 --- a/gui/dialogs/weather_scenario.xml +++ b/gui/dialogs/weather_scenario.xml @@ -213,6 +213,14 @@ setprop("sim/gui/dialogs/weather-scenario/metar", metar ); }); + var metarListener = setlistener( "environment/metar/data", func(n) { + var metar = n.getValue(); + if( metar == nil ) metar = ""; + metar = normalize_string(metar); + setprop("sim/gui/dialogs/weather-scenario/metar", metar ); + gui.dialog_update( "weather_scenario", "metar" ); + }, 1, 0); + #initialize the METAR source selection if( getprop( "environment/params/metar-updates-environment" ) == 0 ) { setprop("sim/gui/dialogs/weather-scenario/source-selection", "Disabled" ); @@ -256,6 +264,7 @@