mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-19 20:44:16 +02:00
1c0deb2bc8
Older versions' copy and paste could leave two symbols with the same uuid. Wires, links and the project database name a symbol by its uuid, so a copy was ambiguous: #1417 worked around it for wires, but the project database keeps one row per uuid, and a link to the uuid could mean either copy. When a project opens, every symbol carrying a uuid another symbol also carries gets a uuid of its own, derived from the shared one and its folio's uuid, so the same file gives the same result on every open. The copy that keeps the shared uuid is the first one linked to another symbol (its partner's link names that uuid), else the first. It is done once the folio's wires are connected, so #1417's choice of which copy a wire meets is kept. Folios holding such a copy are built when the project opens, also with lazy folios. Only files with shared uuids change, once: 3 of the 341 corpus projects. tst_sharedsymboluuid: the lamps given one uuid now come back with three; a linked contact and an unlinked symbol sharing its uuid keep every link and wire, the linked one keeping the uuid. Both fail without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XCdg2Er2vYhB8Vwa5G7fSR