From: James Turner Date: Fri, 27 Nov 2015 23:25:53 +0000 (+0000) Subject: Move functionality into clear_fg_scenerey helper. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8bfb1c3aa59371c125f6483366496d552866c3c6;p=flightgear.git Move functionality into clear_fg_scenerey helper. --- 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)