]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Minor clean-up.
[flightgear.git] / src / Main / globals.cxx
index bbe5dc9fdcfb7e253a947438c3c2ba37626cc9a0..25eb5194b97248037d490fb31fc9046d3ef2b37d 100644 (file)
@@ -188,7 +188,7 @@ FGGlobals::~FGGlobals()
     delete mag;
     delete matlib;
     delete route_mgr;
-    delete current_panel;
+    current_panel = NULL;
 
     delete ATC_mgr;
 
@@ -514,5 +514,12 @@ void FGGlobals::set_warp_delta( long int d )
 {
   fgSetInt("/sim/time/warp-delta", d);
 }
+
+void FGGlobals::set_current_panel( FGPanel *cp )
+{
+  current_panel = cp;
+// poke the renderer to rebuild the scene node as necessary
+  get_renderer()->panelChanged();
+}
     
 // end of globals.cxx