mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
fix: remove empty elementInformation, but keep empty properties
This commit is contained in:
@@ -151,7 +151,10 @@ bool DiagramContext::operator!=(const DiagramContext &dc) const
|
|||||||
void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const
|
void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const
|
||||||
{
|
{
|
||||||
foreach (QString key, keys()) {
|
foreach (QString key, keys()) {
|
||||||
if (m_content[key].toString().trimmed().isEmpty()) { continue; }
|
if ((tag_name == "elementInformation") &&
|
||||||
|
(m_content[key].toString().trimmed().isEmpty())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
QDomElement property = e.ownerDocument().createElement(tag_name);
|
QDomElement property = e.ownerDocument().createElement(tag_name);
|
||||||
// try to sort attributes by removing and re-adding
|
// try to sort attributes by removing and re-adding
|
||||||
property.removeAttribute("show");
|
property.removeAttribute("show");
|
||||||
|
|||||||
Reference in New Issue
Block a user