From 8bfb1c3aa59371c125f6483366496d552866c3c6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 27 Nov 2015 23:25:53 +0000 Subject: [PATCH] Move functionality into clear_fg_scenerey helper. --- src/Main/fg_commands.cxx | 3 --- src/Main/globals.cxx | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index c4b4932ce..661bc2fbd 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1384,9 +1384,6 @@ do_profiler_stop(const SGPropertyNode *arg) static bool do_set_scenery_paths(const SGPropertyNode* arg) { - SGPropertyNode* sim = fgGetNode("/sim", true); - sim->removeChildren("fg-scenery"); - globals->clear_fg_scenery(); std::string terrasyncPath(fgGetString("/sim/terrasync/scenery-dir")); diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index 4425aabb0..d1ec0b47c 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -418,6 +418,8 @@ void FGGlobals::clear_fg_scenery() { fg_scenery.clear(); secure_fg_scenery.clear(); + fgGetNode("/sim", true)->removeChildren("fg-scenery"); + } void FGGlobals::set_catalog_aircraft_path(const SGPath& path) -- 2.39.5