mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 14:14:15 +02:00
2815dbaf47
A symbol file whose terminals have no uuid got a random one for each terminal when opened in the element editor (PartTerminal's constructor), written on save. Every copy of the same old symbol therefore ended up with different terminal uuids, none of them the one a project gives the same terminals on opening (TerminalUuids::fillMissing()). ElementScene::loadContent() now reads a copy of the definition filled by TerminalUuids::fillMissingInDefinition(), the same rule as a project, including the next occurrence for the second of two terminals at one point. Terminals that have a uuid keep it; a paste still renews them all (PastePartsCommand). Checked in the editor: 6es7_212-1ae40-0xb0__p3.elmt (no terminal uuids in the collection) and tm3saf5r_layout.elmt with its uuids stripped (two terminals at one point), opened, nudged back and forth, saved: this build writes exactly the derived values (computed independently in Python), the previous one random ones. Select all, copy, paste, save: 6 terminals, 6 distinct uuids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>