mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
The pages' presses are the primary button's (`PagePointer.edges`, the router's `began`), so a right-button drag was a press nobody held, and every tool that started on egui's `drag_started()`, which counts every button, started on it: the Rectangle tool drew a rectangle, Prepare's selection rectangle selected the fields in it, the Link tool opened Link Properties for a new link, the camera moved its quadrilateral to the page, and the Select tool selected text. On `main` too. `PagePointer.drag_started` is a primary drag of a press the pages hold, started this frame. The page modules read it instead of egui's (comments' shapes, callout and text box, Prepare, the Link tool, the camera, the text layer, image pick, and the Edit text group, whose owned presses were primary already); zoom, crop, Sign area and Redact already asked for the primary button. The guard refuses a bare `.drag_started()` in a page module (`NOT_PAGE_DRAGS` lists the widgets of their own: Organize's thumbnails, the signature pad, the Scan tab), and the router's `drag_started` is `drag_began`, so the rule reads cleanly. Tests, one per family, each seen failing with the fix reverted: `a_right_button_drag_draws_no_rectangle`, `…_selects_no_field`, `…_draws_no_link`, `…_leaves_the_camera_quadrilateral`, `…_selects_no_text`; the guard rule against a planted `#[cfg(any())]` call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>