Add missing attributes for dependent objects

refs #9082
This commit is contained in:
Gunnar Beutner 2015-08-18 19:39:10 +02:00
parent 71dc682924
commit da7d04581d
1 changed files with 6 additions and 1 deletions

View File

@ -130,8 +130,13 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full
path += "/" + EscapeName(fullName) + ".conf";
Dictionary::Ptr allAttrs = new Dictionary();
attrs->CopyTo(allAttrs);
nameParts->CopyTo(allAttrs);
allAttrs->Remove("name");
ConfigWriter::Ptr cw = new ConfigWriter(path);
cw->EmitConfigItem(type->GetName(), name, false, templates, attrs);
cw->EmitConfigItem(type->GetName(), name, false, templates, allAttrs);
cw->EmitRaw("\n");
return true;