Make restore-defaults option also apply to aircraft-specific data
This commit is contained in:
parent
d01d7730d6
commit
121790f337
2 changed files with 7 additions and 4 deletions
|
@ -1193,18 +1193,20 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
|
|||
}
|
||||
#### end of temporary hack for /sim/auto-coordination
|
||||
|
||||
if (getprop("/sim/startup/save-on-exit")) {
|
||||
if (!getprop("/sim/startup/restore-defaults")) {
|
||||
# load user-specific aircraft settings
|
||||
data.load();
|
||||
var n = props.globals.getNode("/sim/aircraft-data");
|
||||
if (n != nil)
|
||||
foreach (var c; n.getChildren("path"))
|
||||
if (c.getType() != "NONE")
|
||||
data.add(c.getValue());
|
||||
} else {
|
||||
}
|
||||
if (!getprop("/sim/startup/save-on-exit"))
|
||||
{
|
||||
# prevent saving
|
||||
data._save_ = func nil;
|
||||
data._loop_ = func nil;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<fullscreen type="bool" preserve="y">false</fullscreen>
|
||||
<units>feet</units>
|
||||
<save-on-exit type="bool" userarchive="y">true</save-on-exit>
|
||||
<restore-defaults type="bool">false</restore-defaults>
|
||||
<browser-app write="n">firefox -new-tab "%u"</browser-app>
|
||||
<!-- help viewer; only used under Unix -->
|
||||
<terminal-ansi-colors type="bool">true</terminal-ansi-colors>
|
||||
|
|
Loading…
Reference in a new issue