1
0
Fork 0

GlobalWeather bugfix: enable editing of METAR

Initialize the METAR textbox to the current METAR on selection
of "Manual input" to have some data to start with. Apply the
data when the METAR textbox looses focus.
This commit is contained in:
Torsten Dreyer 2010-11-21 21:20:17 +01:00
parent 1751fdb22e
commit 10ed64e3ee

View file

@ -1517,6 +1517,16 @@
<value type="int">1</value>
</greater-than>>
</enable>
<binding>
<command>dialog-apply</command>
<object-name>metar</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
setprop( "/environment/metar/data", getprop( "sim/gui/dialogs/weather-scenario/metar") );
</script>
</binding>
</textbox>
<!-- Automatic Weather -->
@ -1584,7 +1594,7 @@
stateChange : func {
var scenarioName = getprop( me.base ~ "/source-selection");
var metar = nil;
var metar = getprop( "environment/metar/data" );
if( scenarioName == "Disabled" ) {
setprop( "/environment/params/metar-updates-environment", 0 );
setprop( "/environment/realwx/enabled", 0 );