mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 01:04:13 +02:00
8e6dc1a849
injectCrossRefLinks() drew each link as it found it: the contacts of a cross-reference come from a QMultiMap keyed by Element pointer, and the scene's items in stacking order. Both change from run to run, so the same project exported twice gave two different PDFs whose only difference was the order of the link annotations. The links are now collected and drawn sorted by their rectangle on the page (top, left, bottom, right), with the target as the tie-break. The links themselves are unchanged. The print window's PDF export goes through the same function. tst_pdflinkorder exports examples/industrial.qet five times in separate processes and requires the same links in the same order. It fails on the old code (lists differ at index 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>