]> git.mxchange.org Git - flightgear.git/commitdiff
Move functionality into clear_fg_scenerey helper.
authorJames Turner <zakalawe@mac.com>
Fri, 27 Nov 2015 23:25:53 +0000 (23:25 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 27 Nov 2015 23:25:53 +0000 (23:25 +0000)
src/Main/fg_commands.cxx
src/Main/globals.cxx

index c4b4932ce36efb828d429c15f9b8d2271531e3e5..661bc2fbd8d6e0bc19178c456395b7b635a83f2b 100644 (file)
@@ -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"));
index 4425aabb09292b22bfae1e096721e4bdf1d851ca..d1ec0b47cd8d51a9a9d7d4ab16e720f709dfdf6e 100644 (file)
@@ -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)