mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-01 18:25:32 -06:00
Every click on the drawing used to be decided when the button came up: egui calls a press that travels more than a few points a drag, so a click made while the hand was still moving was lost (object picks, the second corner of a click-click window) or taken where the hand had got to (points, #835). Following the model agreed in #1001, a press now acts at once, where the button went down: it places the point (snapped as the cursor would be there), picks the object or sets a selection window's corner. Each press among a frame's events counts, so a slow frame keeps all its clicks (#815). What the pointer does while the button is held only decides whether the press becomes a drag: once it leaves a 6-point tolerance a 0.25 s timer starts; a button still down then is a drag and closes the window its press opened where it comes up, while a button that comes up sooner was a click and the window waits for the next press. Holding still never makes a drag. The detector lives in canvas/press.rs. Grips with no command running, ZOOM Realtime, the Dynamic Input options menu, model tiles and double-clicks keep their release-based clicks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>