mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 14:14:18 +02:00
5441e2ae76
On opening a project, a coil and its contacts are linked in the order the folios' items are visited. When contacts are on an earlier folio than the coil they link first, so the coil's list followed the folio order instead of the file's, and contacts on one folio swapped places from run to run. Saving the same project twice could then give two different files. After linking, Element::initLink() now puts the linked elements back in the order the file listed them. Elements linked but not in that list keep their place after it. Test: tst_resaveunchanged::savedLinkOrderKept reverses a coil's two contacts in m_000.qet and checks a resave keeps that order; it fails without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Wga9B92BNurDEtxxtCDxf