1
0
Fork 0

Ensure launcher AW toggle overrides the sim setting

Set the property value to false explicitly when BW is requested in
the launcher, otherwise the auto-saved value takes over.
This commit is contained in:
James Turner 2018-03-22 11:59:15 +00:00
parent 28d8317242
commit f75f413970

View file

@ -130,7 +130,7 @@ Item {
+ "real-world weather data (METAR) information may not show exactly "
+ "the conditions recorded, and is not recommended for multi-player "
+ "flight since the weather simulation is not shared over the network."
setting: "aws-enables"
setting: "aws-enabled"
},
SettingCheckbox {
@ -184,14 +184,16 @@ Item {
}
onApply: {
if (advancedWeather.checked) {
// set description from the weather scenarios, so Local-weather
// can run the appropriate simulation
_config.setProperty("/nasal/local_weather/enabled", 1);
}
// important that we always set a value here, to override
// the auto-saved value in FlightGear. Otherwise we get
// confusing behaviour when the user toggles the setting
// inside the sim
_config.setProperty("/nasal/local_weather/enabled", advancedWeather.checked);
var index = weatherScenario.selectedIndex;
// set description from the weather scenarios, so Local-weather
// can run the appropriate simulation
if (!fetchMetar.checked) {
if (weatherScenario.isCustomMETAR) {
_config.setArg("metar", customMETAR.value)