Fixed the QETProject::setTemplateXmlDescription.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1135 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2010-12-26 22:52:54 +00:00
parent aeae9a9f89
commit 2642095fcf

View File

@@ -337,12 +337,9 @@ bool QETProject::setTemplateXmlDescription(const QString &template_name, const Q
QDomElement old_description = titleblock_templates_xml_[template_name];
if (!old_description.parentNode().isNull()) {
old_description.parentNode().replaceChild(import, old_description);
titleblock_templates_xml_[template_name] = import;
}
} else {
// or simply insert the new one
titleblock_templates_xml_.insert(template_name, import);
}
titleblock_templates_xml_.insert(template_name, import);
if (titleblock_templates_.contains(template_name)) {
titleblock_templates_[template_name] -> loadFromXmlElement(titleblock_templates_xml_[template_name]);