weather-dialog: handle incoming METAR
metar/data is a tied property, it does not trigger a listener - metar/valid does.
This commit is contained in:
parent
a93bc69add
commit
d02cff21cf
1 changed files with 3 additions and 3 deletions
|
@ -994,9 +994,9 @@
|
|||
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
|
||||
});
|
||||
|
||||
var metarListener = setlistener( "environment/metar/data", func(n) {
|
||||
var metar = n.getValue();
|
||||
if( metar == nil ) metar = "";
|
||||
var metarListener = setlistener( "environment/metar/valid", func(n) {
|
||||
var metar = getprop("environment/metar/data");
|
||||
if( metar == nil or metar == "" ) metar = "NIL";
|
||||
metar = normalize_string(metar);
|
||||
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
|
||||
gui.dialog_update( "weather", "metar" );
|
||||
|
|
Loading…
Add table
Reference in a new issue