Fix problem that not all childs were added to the xml document

This commit is contained in:
Martin Marmsoler
2020-10-03 20:50:08 +02:00
parent 9521a8aa0b
commit f3368f159d
2 changed files with 6 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ QDomElement PartTerminal::toXml(QDomDocument &xml_document) const {
// Do not store terminal data in its own child
QDomElement terminalDataElement = d->toXml(xml_document);
for (int i=0; i < terminalDataElement.childNodes().length(); i++) {
qdo.appendChild(terminalDataElement.childNodes().at(i));
qdo.appendChild(terminalDataElement.childNodes().at(i).cloneNode()); // cloneNode() is important, otherwise no deep clone is made
}
return qdo;