From 121790f337a6e254faa22f085392ce6cb45c1c28 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 15 Jul 2012 11:07:23 +0200 Subject: [PATCH] Make restore-defaults option also apply to aircraft-specific data --- Nasal/aircraft.nas | 10 ++++++---- preferences.xml | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index 44bb1137b..581dbf795 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -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; } }); - - diff --git a/preferences.xml b/preferences.xml index d324219d2..4211afe53 100644 --- a/preferences.xml +++ b/preferences.xml @@ -54,6 +54,7 @@ Started September 2000 by David Megginson, david@megginson.com false feet true + false firefox -new-tab "%u" true