Commit Graph

2 Commits

Author SHA1 Message Date
Beat Hangartner 0513344b92 Address review: drop dummy undo children, applyCrop() returns bool
- replaceImage(), mirror() and setTransparentColor() no longer add a
  dummy QUndoCommand child: the imageSource child already keeps
  QPropertyUndoCommand::mergeWith() from merging two of them.
- The explanation of the position and pivot maths moves from crop() to
  applyCrop(), where that code now lives; the stale older doc block of
  crop() goes.
- applyCrop() returns false when nothing was cropped, and
  qet.cropImage() passes that on. tst_imagecropundo checks it for the
  current crop, an empty rectangle and one outside the picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:01:30 +02:00
Beat Hangartner 05b71e07a0 Add qet.cropImage() and qet.imageCrop() to the script API
Crop a picture as the crop tool does, in one undo step, and read its
crop rectangle back. tst_imagecropundo uses them on the real binary:
a crop that was undone is not saved, and redoing it saves it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:41:58 +02:00