From af6095c5d13c3379f96b563e857eb2897aea1f8c Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 22 Nov 2013 22:42:04 +0000 Subject: [PATCH] Reset: do general init on reset path --- src/Main/fg_init.cxx | 4 +++- src/Main/globals.cxx | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index d65092bfe..15397c41f 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -984,6 +984,9 @@ void fgStartNewReset() globals->resetPropertyRoot(); globals->restoreInitialState(); + fgInitConfig(0, NULL, true); + fgInitGeneral(); // all of this? + render = new FGRenderer; render->setEventHandler(eventHandler); globals->set_renderer(render); @@ -995,7 +998,6 @@ void fgStartNewReset() flightgear::CameraGroup::buildDefaultGroup(viewer.get()); fgOSResetProperties(); - fgInitConfig(0, NULL, true); // init some things manually // which do not follow the regular init pattern diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index ee639d64a..2fda3045b 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -520,10 +520,9 @@ FGGlobals::resetPropertyRoot() { delete locale; -#if DEBUG_RESET SG_LOG(SG_GENERAL, SG_INFO, "root props refcount:" << props.getNumRefs()); treeDumpRefCounts(0, props); -#endif + props = new SGPropertyNode; initProperties(); locale = new FGLocale(props); -- 2.39.5