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 <noreply@anthropic.com>
This commit is contained in:
1 parent
d753874fe4
commit
a5fd040745
4 files changed
+413
-96
No files matched your search
@@ -942,6 +942,12 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
if grip_dyn_locked {
|
||||
return self.update(Message::CommandSubmit);
|
||||
}
|
||||
// Enter while a grip is hot places it where it is (or keeps
|
||||
// it hot when it has not moved) — it must not fall through to
|
||||
// "repeat the last command", which would discard the edit.
|
||||
if self.tabs[i].active_grip.is_some() && self.tabs[i].active_cmd.is_none() {
|
||||
return self.commit_active_grip_edit();
|
||||
}
|
||||
|
||||
// Normal command Dynamic Input commit.
|
||||
if let Some(task) = self.try_dyn_commit() {
|
||||
|
||||
Reference in new issue
Block a user