From 5448a995f374b7564f12f2203e4ff2a1bdd2fa7a Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 29 Apr 2020 22:41:07 +0100 Subject: [PATCH] Don't reload materials on LoD change https://sourceforge.net/p/flightgear/codetickets/2224/ Speculative fix that reloading materials might impact scenery reloading. No reason to reload materials on an LoD change, so removing it. --- gui/dialogs/static-lod.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gui/dialogs/static-lod.xml b/gui/dialogs/static-lod.xml index 3874991e0..e56b26b84 100644 --- a/gui/dialogs/static-lod.xml +++ b/gui/dialogs/static-lod.xml @@ -22,11 +22,10 @@ } if (reinit) { - fgcommand("reload-materials", props.Node.new()); fgcommand("reinit", props.Node.new({"subsystem": "scenery"})); } }; - + var lodDIALOG = cmdarg(); var dlgLOD = props.Node.new({"dialog-name": "static-lod"}); @@ -152,7 +151,7 @@ } update_ai_mp = func(can_reload) { - var mode = update_enabling (); + var mode = update_enabling (); var distance_mode = getprop("sim/rendering/static-lod/aimp-range-mode-distance"); update_description(mode); if (mode == "Low Detail only") { @@ -178,11 +177,11 @@ update_aimp_mode = func{ var new_mode = getprop("/sim/gui/dialogs/static-lod/aimp-mp-mode"); if (new_mode != current_ai_mp_mode) { - + if (current_ai_mp_mode == "Specify Ranges") { current_detailed = getprop("/sim/rendering/static-lod/aimp-detailed"); current_bare =getprop("/sim/rendering/static-lod/aimp-bare"); - } + } if (current_ai_mp_mode == "Low Detail only" or current_ai_mp_mode == "High Detail only") { if (current_detailed != nil) setprop("/sim/rendering/static-lod/aimp-detailed", current_detailed ); @@ -410,7 +409,7 @@ 6 2 - + left distance sim/rendering/static-lod/aimp-range-mode-distance