mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-09 21:54:13 +02:00
be48b59e8f
Before #1310, undoing a crop left the crop rectangle in place, so a project saved afterwards has a <crop> but shows the uncropped picture. Since #1368 the picture shown is computed from the original and the crop, so the first mirror or colour key of such a picture applied the old crop again, and undoing that edit showed the cropped picture. The picture shown is always exactly the size of the crop. fromXml() now drops a crop that does not match it: the crop becomes the whole original, and when the shown picture is not the original's size either, the shown picture becomes the original. Valid files load and save as before. New tst_imagestalecrop: a valid crop is kept; a stale one is dropped for a shown picture of the original's size and of another size, where a later crop cuts the picture that was shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>