+ if (_dialog_names.find(name) == _dialog_names.end()) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "Dialog " << name << " not defined");
+ return NULL;
+ }
+
+ NameDialogDict::iterator it = _dialog_props.find(name);
+ if (it == _dialog_props.end()) {
+ // load the XML
+ SGPath path = _dialog_names[name];
+ SGPropertyNode_ptr props = new SGPropertyNode;
+ try {
+ readProperties(path.str(), props);
+ } catch (const sg_exception &) {
+ SG_LOG(SG_INPUT, SG_ALERT, "Error parsing dialog " << path);
+ return NULL;
+ }
+
+ it = _dialog_props.insert(it, std::make_pair(name, props));
+ }