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