From 93bfcb46fe4c5e98e6583132ecafaa585e54a35c Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 16 Nov 2026 23:32:16 +0000 Subject: [PATCH] Pen: the knot a press acts on is named knot, so the snapped point at stays the new anchor's place --- crates/draw/src/ui/pen/tool.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/draw/src/ui/pen/tool.rs b/crates/draw/src/ui/pen/tool.rs index 19175d49e..e5b9027ae 100644 --- a/crates/draw/src/ui/pen/tool.rs +++ b/crates/draw/src/ui/pen/tool.rs @@ -480,7 +480,7 @@ impl PenTool { } else { Kind::Pull }; - let at = if kind == Kind::Close { 0 } else { n.saturating_sub(1) }; + let knot = if kind == Kind::Close { 0 } else { n.saturating_sub(1) }; let in_ctrl = match kind { Kind::Pull => { let mut p = at; @@ -491,12 +491,12 @@ impl PenTool { p } Kind::Retract => { - let k = &mut draft.knots[at]; + let k = &mut draft.knots[knot]; k.out_ctrl = k.anchor; k.smooth = false; k.in_ctrl } - Kind::Close | Kind::Grab(_) | Kind::Move(_) => draft.knots[at].in_ctrl, + Kind::Close | Kind::Grab(_) | Kind::Move(_) => draft.knots[knot].in_ctrl, }; self.change(draft); self.drag = Some(Drag { origin: pos, kind, last: pos, moved: false, in_ctrl });