Keep terminal uuids when a whole category is replaced; never duplicate one

Review of the previous commit:
- keep() could give an old uuid to a new terminal while another terminal
  of the new definition already carried it (a moved terminal), leaving
  two terminals with one uuid. A terminal carrying any old uuid is now
  left alone, and an old uuid already in use is never handed out.
- copyDirectory() replaced a whole category of the embedded collection
  (drag a folder onto the project's folder of the same name) without
  carrying terminal uuids over. keepInDirectory() walks both trees by
  name and calls keep() on each symbol.
- The "wire(s) not loaded" log line repeated the folio's list on every
  paste; it is now written only when a folio is loaded.

tst_terminaluuids: 3 new cases, each red on the previous keep().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-09-29 07:32:12 +13:00
parent e6ac117f9b
commit 079d085a87
5 changed files with 135 additions and 5 deletions
+1 -1
View File
@@ -1925,7 +1925,7 @@ bool Diagram::fromXml(QDomElement &document,
delete c;
}
}
if (!m_wires_not_reconnected.isEmpty()) {
if (consider_informations && !m_wires_not_reconnected.isEmpty()) {
qWarning().noquote() << "Diagram::fromXml():"
<< m_wires_not_reconnected.size()
<< "wire(s) not loaded, a terminal they join was not found:"