In-app shape copy and paste (Ctrl+C / Ctrl+V) - #243
Merged
Merged
Conversation
added 2 commits
August 2, 2026 17:39
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7ab8be5. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
edit.copy/edit.paste) for an in-app shape clipboard.Shape_add_delta; clipboard survives New.Closes #242
Test plan
EzyCad_tests --gtest_filter=Shp_test.Copy*:Shp_test.New_file*docs/usage.md/usage-settings.md/ CHANGELOGNote
Medium Risk
New document mutation path with hierarchy edge cases (group subtree, sibling paste, cycle guards); mitigated by extensive unit tests and all-or-nothing paste validation.
Overview
Adds in-app shape copy/paste via remappable
edit.copy/edit.paste(defaults Ctrl+C / Ctrl+V), wired through hotkeys andOcct_view::copy_selected_shapes/paste_clipboard_shapes. Copy snapshots selected solids or, when the selection exactly matches a Shape List group’s descendant solids, the whole subtree into a sessionShape_recforest with independent BREP (not the OS clipboard). Paste deep-copies under the current group (new ids, uniquified names, same pose), uses oneShape_add_deltafor undo, and pastes as a sibling when the current group is still the copied group root.File → New keeps clipboard contents but clears live source-root tracking so copy → New → paste works. Parent-chain walks (
would_reparent_create_cycle,shape_descendant_solids,shape_ancestors_visible) and Shape List drawing gain cycle guards to avoid hangs on corrupt hierarchy.Docs,
res/ezycad_settings.json, andShp_testCopy_* /New_file_keeps_shape_clipboardtests are included. Sketch geometry and OS clipboard are unchanged.Reviewed by Cursor Bugbot for commit 15a0f38. Bugbot is set up for automated code reviews on this repo. Configure here.