mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-17 19:34:13 +02:00
786f8574d9
A project saves, for every placed symbol, where each terminal docked, its orientation and its number. When the symbol's definition is replaced by one whose terminal sits a few units elsewhere, wires were matched by exact position and so were dropped on the next open: legacy wires by Terminal:: fromXml(), uuid wires by the uuid derived from the terminal's new place. Element::fromXml() now pairs each saved terminal that nothing matched exactly with the live terminal of the same orientation whose docking point is within 5 units in x and y, only when each is the other's only candidate. A pair registers the saved number, and the uuid derived from the old place, which Diagram::findTerminals() checks after the derived uuid of the current place. Wire ends reattached this way are counted and logged once per folio. tst_movedterminals covers a move of 3 and 5 units (number and derived uuid), 6 units, two candidates, and an unmoved terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>