mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
fix: remove empty elementInformation, but keep empty properties
This commit is contained in:
parent
f26733f34e
commit
b8e4fca09f
@ -151,7 +151,10 @@ bool DiagramContext::operator!=(const DiagramContext &dc) const
|
||||
void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const
|
||||
{
|
||||
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);
|
||||
// try to sort attributes by removing and re-adding
|
||||
property.removeAttribute("show");
|
||||
|
Loading…
x
Reference in New Issue
Block a user