fix(clipboard): share COPY across drawings

This commit is contained in:
Hakan Seven committed 2026-08-29 23:12:26 +03:00
1 parent 217f20d8bc
commit 7a523a0f44
5 files changed
+67 -36

No files matched your search

+1 -1
View File
@@ -132,6 +132,6 @@ impl CadCommand for PasteCommand {
// ── Autocomplete registry ─────────────────────────────────
inventory::submit!(crate::command::CommandRegistration { names: &["PASTECLIP"] }); // PasteCommand
inventory::submit!(crate::command::CommandRegistration { names: &["PASTE", "PASTECLIP"] }); // PasteCommand
inventory::submit!(crate::command::CommandRegistration { names: &["PASTEORIG"] });
inventory::submit!(crate::command::CommandRegistration { names: &["PASTEBLOCK"] });
+4 -1
View File
@@ -92,7 +92,10 @@ impl CadCommand for CopyCommand {
match &self.step {
Step::Base => {
self.step = Step::Placing(pt);
CmdResult::NeedPoint
CmdResult::CopyToClipboard {
handles: self.handles.clone(),
base: pt,
}
}
Step::Placing(base) => {
let delta = pt - *base;