Files
pdfcraft/parity
jweaver3andFredApps 23fe7035bf M4: a drawn crop rectangle opens Set Page Boxes to fine-tune before cropping (#5695) (#7793)
* M4: a drawn crop rectangle opens Set Page Boxes to fine-tune before cropping (#5695)

Releasing a rectangle with the Crop tool no longer crops at once. Set Page
Boxes opens with the crop box's margins taken from the rectangle, for that
page alone, so the margins can be typed exactly before OK; Cancel crops
nothing. A double-click still opens the dialog from the page's own box, and
the tool still goes back to Select after one crop.

* fix(crop): Set Page Boxes applies a drawn rectangle to the page it was drawn on (#5695)

A crop rectangle drawn on a page mostly scrolled away (the bottom of one
page above the next) left the next page current: the page shown most
becomes current again once the press is over. Set Page Boxes then
seeded from and cropped that page instead.

The rectangle now carries its page, and BoxesDraft::page names the page
the dialog is for, so seeding, the preview and OK all use the page the
rectangle was drawn on, whichever page is current. Opening the dialog
any other way, OK and Cancel clear it.

* fix(crop): Set Page Boxes forgets the drawn page however it closes, and OK checks it is still there (#5695)

- The page a crop rectangle was drawn on is cleared when the dialog
  closes by any route (OK, Cancel, Escape, a click outside), so opening
  it again some other way, as the control channel does, is for the
  current page.
- OK resolves the page as the dialog shows it (BoxesDraft::page_or):
  one deleted while the dialog is open gives way to the current page,
  so what is shown and what is changed stay the same page.

* fix(ui): a crop rectangle's Set Page Boxes draft stays with its document

A rectangle drawn with the Crop tool seeds Set Page Boxes for its page,
but the dialog and OK read the active document. Another document
coming forward while it was open (the system opening a file already in
a tab focuses that tab) showed the draft over that document, and OK
cropped its page of the same number. The draft now records the
document it was drawn in; while another one is active the dialog
closes and OK applies nothing.

---------

Co-authored-by: FredApps <[email protected]>
2026-12-04 11:35:20 +01:00
..