That would mean, we only remove empty entries with element-information in element-files, but keep all other properties with empty content.
I would like to remove empty entries in elementInformation from element-files, because it would be a massive overhead and useless information, if an element like an ordinary terminal would have the empty information about up to four auxiliary parts...
Already prepared this diff:
diff --git a/sources/diagramcontext.cpp b/sources/diagramcontext.cpp
index 864ad9b3a..681fed49e 100644
--- a/sources/diagramcontext.cpp
+++ b/sources/diagramcontext.cpp
@@ -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");
What do you think, Galexis and Laurent?