diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index df81cb1fd..a0885b845 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -142,6 +142,15 @@ NewGUI::closeDialog (const string& name) return false; // dialog wasn't open... } +SGPropertyNode_ptr +NewGUI::getDialog (const string &name) +{ + if(_dialog_props.find(name) != _dialog_props.end()) + return _dialog_props[name]; + else + return 0; +} + void NewGUI::setActiveDialog (FGDialog * dialog) { diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 2d00adfcc..980b7871f 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -133,6 +133,13 @@ public: */ virtual bool closeDialog (const string &name); + /** + * Get dialog property tree's root node. + * @param name The name of the dialog box. + * @return node pointer if the dialog was found, zero otherwise. + */ + virtual SGPropertyNode_ptr getDialog (const string &name); + /** * Return a pointer to the current menubar. */