mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
if no uuid for the terminal is available, use write the id of the terminal to the xml file, otherwise no connection can be done after saving
This commit is contained in:
@@ -662,6 +662,11 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
|
||||
qFuzzyCompare(dockPos1.y(), dockPos2.y()) &&
|
||||
p->orientation() == diagramTerminal.orientation()) { // check if the part in the collection is the same as in the diagram stored
|
||||
qDebug() << "Matching Terminal found.";
|
||||
// store id for legacy purpose, because when opening a old project in the collection the terminal does not have an uuid. Therefore the id must be used
|
||||
if (p->uuid().isNull()) {
|
||||
p->setID(qde.attribute("id").toInt());
|
||||
}
|
||||
|
||||
priv_id_adr.insert(qde.attribute("id").toInt(), p);
|
||||
terminal_trouvee = true;
|
||||
// We used to break here, because we did not expect
|
||||
|
||||
Reference in New Issue
Block a user