mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-04 03:20:53 +01:00
store terminalData in the terminal tag. Fixes the drag problem from the collection into the diagram. The problem was that some tags missed and therefore the creation of the element for dragging was unsuccessful
This commit is contained in:
@@ -78,7 +78,17 @@ void PartTerminal::toXmlPriv(QDomElement& e) const {
|
||||
d->m_pos = pos();
|
||||
|
||||
QDomDocument doc = e.ownerDocument();
|
||||
e.appendChild(d -> toXml(doc));
|
||||
QDomElement terminalData = d -> toXml(doc);
|
||||
|
||||
// Copy everything from terminalData to terminal
|
||||
for (int i=0; i < terminalData.attributes().count(); i++) {
|
||||
QDomAttr attr = terminalData.attributes().item(i).toAttr();
|
||||
e.setAttribute(attr.name(), attr.value());
|
||||
}
|
||||
// for (int i=0; i < terminalData.childNodes().count(); i++) {
|
||||
// e.appendChild(terminalData.childNodes().at(i));
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user