1
0
Fork 0

Preserve developer-mode on reset

Thanks to Henning for pointing out problem.
This commit is contained in:
James Turner 2020-06-01 11:15:45 +01:00
parent 2f1852ee83
commit 26b0148747

View file

@ -655,7 +655,10 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
developerMode = simgear::strutils::to_bool(s);
}
fgSetBool("/sim/developer-mode", developerMode);
auto node = fgGetNode("/sim/developer-mode", true);
// ensure this value survives reset
node->setAttribute(SGPropertyNode::PRESERVE, true);
node->setBoolValue(developerMode);
sglog().setDeveloperMode(developerMode);
static SimLogFileLine simLogFileLine;