From 94310894934f55a838d5d3b4a445a8814996dbe5 Mon Sep 17 00:00:00 2001 From: Bar Borer Date: Tue, 3 Nov 2026 03:37:31 +0200 Subject: [PATCH] Puppet: decide a marquee from where the button went down (#2865) The drag branch asked what was under the pointer when the drag was recognised, by which time a quick drag has already reached the art, so no gesture started at all. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/panels/viewer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/viewer.rs b/crates/ui-egui/src/panels/viewer.rs index 5b42488cb..570c0ebca 100644 --- a/crates/ui-egui/src/panels/viewer.rs +++ b/crates/ui-egui/src/panels/viewer.rs @@ -1168,8 +1168,9 @@ fn phase_dragstart(app: &mut EffectcraftApp, ui: &mut egui::Ui, ectx: &EvalCtx, t if t.is_shape() => Some(Gesture::Create { tool: t, start: map.to_comp(press) }), Tool::ObjectMatte => Some(Gesture::ObjectMatteBox { start: press }), t if t.puppet_kind().is_some() && super::puppet_tool::hit(&pin_hits, press).is_none() => { - // Off the pins: Alt or a press outside the art drags a marquee that selects pins. - (mods.alt || puppet_layer(app, cpt).is_none()).then_some(Gesture::PinMarquee { start: press }) + // Off the pins: Alt or a press outside the art drags a marquee that selects pins. Asked + // of where the button went down: the pointer may be over the art by the time this is a drag. + (mods.alt || puppet_layer(app, map.to_comp(press)).is_none()).then_some(Gesture::PinMarquee { start: press }) } t if t.puppet_kind().is_some() => super::puppet_tool::hit(&pin_hits, press).and_then(|(h, part)| { use super::puppet_tool::PinPart;