rebase XMLProperties_New (c0d9bf9) to master

This commit is contained in:
Martin Marmsoler
2020-10-16 11:43:45 +02:00
committed by Martin Marmsoler
parent 73b394527d
commit f3097fc537
59 changed files with 1493 additions and 725 deletions

View File

@@ -1505,7 +1505,11 @@ void QETProject::readDefaultPropertiesXml(QDomDocument &xml_project)
{
XRefProperties xrp;
xrp.fromXml(elmt);
m_default_xref_properties.insert(elmt.attribute("type"), xrp);
QString type;
if (PropertiesInterface::propertyString(elmt, "type", &type) == PropertiesInterface::PropertyFlags::Success)
m_default_xref_properties.insert(type, xrp);
else
qDebug() << "xref Property was not added to m_default_xref_properties.";
}
}
if (!conds_autonums.isNull())
@@ -1563,19 +1567,13 @@ void QETProject::writeDefaultPropertiesXml(QDomElement &xml_element)
QDomDocument xml_document = xml_element.ownerDocument();
// export size of border
QDomElement border_elmt = xml_document.createElement("border");
default_border_properties_.toXml(border_elmt);
xml_element.appendChild(border_elmt);
xml_element.appendChild(default_border_properties_.toXml(xml_document));
// export content of titleblock
QDomElement titleblock_elmt = xml_document.createElement("inset");
default_titleblock_properties_.toXml(titleblock_elmt);
xml_element.appendChild(titleblock_elmt);
xml_element.appendChild(default_titleblock_properties_.toXml(xml_document));
// exporte default conductor
QDomElement conductor_elmt = xml_document.createElement("conductors");
default_conductor_properties_.toXml(conductor_elmt);
xml_element.appendChild(conductor_elmt);
xml_element.appendChild(default_conductor_properties_.toXml(xml_document));
// export default report properties
QDomElement report_elmt = xml_document.createElement("report");