From: david Date: Tue, 21 Jan 2003 02:09:27 +0000 (+0000) Subject: Added support for reinit(), to reload the configuration files without X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=87a84efbb0ccb19500ad18fcdba390d208b414eb;p=flightgear.git Added support for reinit(), to reload the configuration files without having to restart FlightGear. This should speed up GUI design and debugging quite a bit. --- diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 2e9b4d560..a0e17a65e 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -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 () { diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 7936c8a17..2fd8909f4 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -54,6 +54,11 @@ public: */ virtual void init (); + /** + * Reinitialize the GUI subsystem. + */ + virtual void reinit (); + /** * Bind properties for the GUI subsystem. *