From 9bfd6b7be5d5c99e2151cb5485889ecfea91f57c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 10 Nov 2026 23:00:40 -0800 Subject: [PATCH] Paths: describe the anchor added on a selected segment as an end of its halves A selected segment that path.insertAnchor splits stays selected as its two halves. The new anchor is the end both halves share, so it moves with them, and Delete cuts both halves. docs/mcp.md and the comment on renumber_after_insert called it a direct-selected anchor; they now describe it as an end of the halves that moves with them. --- crates/engine/src/cmd/path.rs | 2 +- docs/mcp.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/path.rs b/crates/engine/src/cmd/path.rs index 9ee6b61bb..12d76470c 100644 --- a/crates/engine/src/cmd/path.rs +++ b/crates/engine/src/cmd/path.rs @@ -1534,7 +1534,7 @@ fn stretch_weights(anchors: &[Anchor], closed: bool, roles: &[Stretch]) -> Vec<[ /// After an anchor is added at `(si, added)` of path `id`, number the direct-selected anchors and /// selected segments after it on that subpath one higher, so the selection keeps the same points. /// A selected segment that the new anchor splits stays selected as its two halves, and the new -/// anchor is added to the direct-selected anchors. +/// anchor joins its ends in the anchors that move with it. fn renumber_after_insert(sel: &mut Selection, id: NodeId, si: usize, added: usize) { if let Some(set) = sel.anchors.get_mut(&id) { // A selected anchor index can name no anchor (`select.anchors` takes any index), so the diff --git a/docs/mcp.md b/docs/mcp.md index fda4c0012..88a485d83 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3677,8 +3677,8 @@ is not a whole number of 0 or more, such as 1.5, -1 or "1" ("missing integer `su an `anchor` or `segment` in the same way. The document does not change and no undo step is recorded. `path.insertAnchor` keeps the direct-selected anchors and selected segments of the path on the same points: those after the new anchor on its subpath are numbered one higher, and a selected segment that the new anchor splits stays -selected as its two halves, and the new anchor is direct-selected with them. Undo restores the path and the selection -in one step. +selected as its two halves, with the new anchor as an end of both that moves with them. Undo restores the path and +the selection in one step. `path.reshape {id, x, y, dx, dy, tol?, focal?, radius?}` (a Reshape tool drag) grabs the path at `x`, `y`, adding an anchor there unless one lies within `tol` (3 by default), and moves that point by `dx`, `dy`.