Files
qelectrotech-source-mirror/tests/qttest
Beat Hangartner afa35e094d Undo restores whether a picture's pivot was placed by hand
A picture remembers whether its pivot was placed by hand: a hand-placed
pivot is saved and kept through a resize, a default one is not saved
and recentres after a resize. Two actions changed that flag outside
their undo step:

- applyCrop() marked the pivot as default after moving it to the centre
  of the kept region. After Ctrl+Z the pivot was back where the user
  had put it, but marked as default, so the next save dropped it.
- dragging the pivot handle marked it as hand-placed. After Ctrl+Z the
  pivot was back at the centre but still marked as hand-placed, so a
  later resize left it at the handle's anchor corner.

pivotIsCustom becomes a property, and both actions put it into their
undo command next to rawPivot. tst_imagecropundo checks that a project
saved after undoing a crop keeps its hand-placed pivot.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 10:54:53 +02:00
..
2020-12-08 21:00:43 +01:00
2020-12-08 21:00:43 +01:00