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:
parent
1751fdb22e
commit
10ed64e3ee
1 changed files with 11 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue