forked from 1b-agent/opencadstudio-upstream
feat(grips): compatible grip shortcut menu
A right-click while a grip is hot opens the grip menu: Enter places the grip, Stretch / Move / Rotate / Scale / Mirror switch how the gripped objects are edited (the latter four hand the selection to the matching command with the grip as its base point), Base Point re-bases the gesture at the next click, Copy leaves the originals in place and adds the moved shapes as new entities while keeping the grip hot, Undo snaps the shapes back to where the gesture started, Exit drops the edit. The grip commit path moves out of the left-release handler into `commit_active_grip_edit` so the menu, Enter and the placement click share it; Enter with a hot grip now places it instead of repeating the last command. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
d753874fe4
commit
a5fd040745
4 files changed
+413
-96
No files matched your search
@@ -176,6 +176,9 @@ impl OpenCADStudio {
|
||||
|
||||
pub(super) fn cancel_active_grip_edit(&mut self) -> bool {
|
||||
let i = self.active_tab;
|
||||
// Grip-menu toggles live only as long as the gesture.
|
||||
self.tabs[i].grip_copy = false;
|
||||
self.tabs[i].grip_base_pending = false;
|
||||
let had_grip = self.tabs[i].active_grip.take().is_some()
|
||||
|| self.grip_add_provisional.is_some()
|
||||
|| !self.grip_preview_handles.is_empty()
|
||||
|
||||
Reference in new issue
Block a user