From 525cfadfa3e23decce27b6b1170c3f31d5ca125b Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 1 Sep 2018 19:21:47 +0100 Subject: [PATCH] Reset: persist USERARCHIVE settings Save user-setting properties to disk before beginning a reset, so they are restored correctly. --- src/Main/fg_init.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index a3bb328e2..191b9cc45 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1115,6 +1115,11 @@ void fgStartReposition() void fgStartNewReset() { + // save user settings now, so that USERARCIVE-d values changes since the + // last init are recorded and hence re-loaded when we fgInitConfig down + // later in this function. Otherwise all such settings are lost. + globals->saveUserSettings(); + SGPropertyNode_ptr preserved(new SGPropertyNode); if (!copyPropertiesWithAttribute(globals->get_props(), preserved, SGPropertyNode::PRESERVE))