forked from 1b-agent/opencadstudio-upstream
feat(clipboard): paste images from other programs on desktop too
A paste that finds no text now reads an image off the system clipboard on desktop as well as on the web. The pixels are written as a PNG beside the drawing (or in the config folder for a drawing never saved) and placed as a raster image at the cursor, the same way the web paste attaches a screenshot. PASTESPEC falls back to the same image paste when the clipboard holds neither objects nor text. Refs #645 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d4b4fc37e1
commit
11f68a1185
4 files changed
+62
-33
No files matched your search
+3
-5
@@ -2389,11 +2389,9 @@ pub enum Message {
|
||||
PasteSpecial(Option<String>),
|
||||
/// Completion of a system text clipboard read requested by PASTECLIP.
|
||||
SystemClipboardPaste(SystemClipboardText),
|
||||
/// Web: completion of the clipboard-image read the paste fallback starts
|
||||
/// when no text was found — `Some((name, bytes))` attaches the image,
|
||||
/// `None` reports the usual unsupported-content error. Native never
|
||||
/// constructs it.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
/// Completion of the clipboard-image read the paste fallback starts when
|
||||
/// no text was found — `Some((name, bytes))` attaches the image, `None`
|
||||
/// reports the usual unsupported-content error.
|
||||
SystemClipboardPasteImage(Option<(String, Vec<u8>)>),
|
||||
/// Ctrl/Cmd+A — select all layer rows when the Layer Manager is open, or all
|
||||
/// drawing objects otherwise (#236).
|
||||
|
||||
Reference in new issue
Block a user