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.
This commit is contained in:
parent
0940afae5a
commit
87a84efbb0
2 changed files with 20 additions and 0 deletions
|
@ -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 ()
|
||||
{
|
||||
|
|
|
@ -54,6 +54,11 @@ public:
|
|||
*/
|
||||
virtual void init ();
|
||||
|
||||
/**
|
||||
* Reinitialize the GUI subsystem.
|
||||
*/
|
||||
virtual void reinit ();
|
||||
|
||||
/**
|
||||
* Bind properties for the GUI subsystem.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue