mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 22:24:13 +02:00
2192084483
Mirroring a symbol on a folio keeps its centre in place and then snapped the new position to the grid. A symbol that was not on the grid was pulled onto it, so a second mirror the same way left it a few pixels away from where it started. In perceuse.qet that is 171 symbols, each way. tst_scriptmirror::mirrorBackAndSave() picks its symbol in an order that changes from run to run, so it failed only some of the time (three runs in eight on macOS, and on the Windows CI). The move is now snapped to the grid instead of the position. A symbol on the grid stays on it, one off the grid keeps its offset, and because qRound() rounds halves away from zero both ways, a second mirror moves it exactly back. The new tst_scriptmirror::mirrorTwiceComesBack mirrors every symbol of perceuse.qet twice, horizontally and vertically, and checks that every terminal is back in place. It fails on master (171 symbols moved). No change to the file format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>