]> git.mxchange.org Git - flightgear.git/commitdiff
Added support for reinit(), to reload the configuration files without
authordavid <david>
Tue, 21 Jan 2003 02:09:27 +0000 (02:09 +0000)
committerdavid <david>
Tue, 21 Jan 2003 02:09:27 +0000 (02:09 +0000)
having to restart FlightGear.  This should speed up GUI design and
debugging quite a bit.

src/GUI/new_gui.cxx
src/GUI/new_gui.hxx

index 2e9b4d5604537de0ed70cd67609737146e655e73..a0e17a65ed72ee70d435c123d13f2ab93435eb03 100644 (file)
@@ -42,6 +42,21 @@ NewGUI::init ()
 #endif
 }
 
+void
+NewGUI::reinit ()
+{
+    unbind();
+
+#if !defined(FG_OLD_MENUBAR)
+    delete _menubar;
+    _menubar = new FGMenuBar;
+#endif
+    _dialog_props.clear();
+
+    init();
+    bind();
+}
+
 void
 NewGUI::bind ()
 {
index 7936c8a17c5f77bbf864caeb00435fb052f37462..2fd8909f4f4b2abeb4ebe080ff47a959f4c5d92b 100644 (file)
@@ -54,6 +54,11 @@ public:
      */
     virtual void init ();
 
+    /**
+     * Reinitialize the GUI subsystem.
+     */
+    virtual void reinit ();
+
     /**
      * Bind properties for the GUI subsystem.
      *