mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-19 20:44:16 +02:00
Keep in a .qetz what QElectroTech cannot compute for a symbol it cannot build
The .qetz leaves out of its folios what QElectroTech computes when it builds them (format 4): a symbol's terminal list and information texts, a wire's description of its ends. A symbol whose definition the project does not hold is never built, so none of it came back: through a .qetz, the symbols and wires kept by the previous commit lost their terminal lists, texts and end labels. QetContainer::dropComputed() now leaves a symbol whose definition is not in the project's collection (embeddedDefinitions()), and the wires ending on it, as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,9 +77,10 @@ class tst_qetcontainer : public QObject
|
||||
{
|
||||
QDomDocument copy = document.cloneNode(true).toDocument();
|
||||
const bool own_uuids = QetContainer::ownUuids(copy.documentElement());
|
||||
const QSet<QString> defined = QetContainer::embeddedDefinitions(copy.documentElement());
|
||||
for (QDomElement diagram = copy.documentElement().firstChildElement(QStringLiteral("diagram"));
|
||||
!diagram.isNull() ; diagram = diagram.nextSiblingElement(QStringLiteral("diagram")))
|
||||
QetContainer::dropComputed(diagram, own_uuids);
|
||||
QetContainer::dropComputed(diagram, own_uuids, defined);
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user