diff --git a/lib/rmg/CRmgTemplateStorage.cpp b/lib/rmg/CRmgTemplateStorage.cpp index 9d4539c4f..4181476de 100644 --- a/lib/rmg/CRmgTemplateStorage.cpp +++ b/lib/rmg/CRmgTemplateStorage.cpp @@ -39,8 +39,11 @@ void CRmgTemplateStorage::loadObject(std::string scope, std::string name, const auto tpl = new CRmgTemplate(); try { - tpl->setName(name); //TODO? const auto & templateNode = data; + if (!templateNode["name"].isNull()) + tpl->setName(templateNode["name"].String()); //name can be customised. Allow duplicated names for different template versions. + else + tpl->setName(name); //identifier becomes default name // Parse main template data tpl->setMinSize(parseMapTemplateSize(templateNode["minSize"].String()));