Skip to content

Trailcode/shp copy - #271

Merged
trailcode merged 4 commits into
mainfrom
trailcode/shp-copy
Oct 8, 2026
Merged

trailcode merged 4 commits into
mainfrom
trailcode/shp-copy

Conversation

@trailcode

@trailcode trailcode commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Note

Medium Risk
New duplication paths touch Design geometry, Workbench links, selection, undo, and mode switching; the hotkey and sequential naming changes affect everyday editing workflows.

Overview
Adds in-place duplicate for Design and Workbench (Shift+D, edit.duplicate): Design deep-copies selected solids (or the current group subtree); Workbench adds another link to the same body at the same pose. Copies stay under the original parent, get uniquified names, select the new nodes, enter Move, and record one Shape_add_delta undo step without touching the copy/paste clipboard. Active move/rotate/scale/align previews are cancelled first; Sketch rejects the action.

Remappable Delete now defaults to Ctrl+D so Shift+D can be Duplicate; Delete / Backspace still always delete. Settings defaults and user docs reflect edit.duplicate and the new Delete chord.

Copy naming fixes unique_sequential_name so a trailing .NNN is a sequence suffix (Box.001 → next free Box / Box.002, not Box.001.001).

Also documents and optionally lint-checks a C++ style rule: fold for/while bodies that are only a declaration plus an if into an if-with-initializer, with matching refactors across the view/shape/sketch code and new Shp_test coverage for duplicate and naming.

Reviewed by Cursor Bugbot for commit 8c4b5b7. Bugbot is set up for automated code reviews on this repo. Configure here.

@trailcode
trailcode merged commit 0ba185f into main Oct 8, 2026
4 checks passed
@trailcode
trailcode deleted the trailcode/shp-copy branch October 8, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant