mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Leaving the canvas (for a panel, or out of the window) sent the tool no hover event, so the Selection tool kept its Alt-hover target and went on drawing the measurements (PR review finding). - Tool::pointer_left: the pointer left the canvas with no button held; the Selection tool drops its Distance Guides target and its Smart Guides hover label. Session::tool_pointer_left reaches it. - The canvas remembers whether the pointer was over it last frame: on leaving with no drag it calls tool_pointer_left; on coming back it re-hovers the tool even after a single jump egui doesn't count as moving, so the guides show again. Tests: canvas::tests::distance_guides_go_when_the_pointer_leaves_the_ canvas (fails before: the label stayed over a panel with Alt held), select::tests::distance_guides_need_alt_a_selection_and_smart_guides (pointer_left clears them).