only write author-information, if available

This commit is contained in:
plc-user
2025-02-28 21:08:12 +01:00
parent e0b26592c7
commit 6111d8ca2c

View File

@@ -478,10 +478,12 @@ const QDomDocument ElementScene::toXml(bool all_parts)
root.appendChild(element_info);
}
//complementary information about the element
QDomElement informations_element = xml_document.createElement("informations");
root.appendChild(informations_element);
informations_element.appendChild(xml_document.createTextNode(m_element_data.m_drawing_information.trimmed()));
//complementary information about the element, when available
if (!(m_element_data.m_drawing_information.trimmed().isEmpty())) {
QDomElement informations_element = xml_document.createElement("informations");
root.appendChild(informations_element);
informations_element.appendChild(xml_document.createTextNode(m_element_data.m_drawing_information.trimmed()));
}
QDomElement description = xml_document.createElement("description");