mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 16:07:33 +00:00
Effects: a pasted SVG filter avoids brush effect names and is refused with no free name
Follows #6592. Paste now also skips the names that effects in the document's brush art use when it picks a free name for a pasted SVG filter. When no free name keeps the filter within the 64 KB limit (a one-letter name at the limit with every free letter and digit taken), the paste is refused instead of keeping the name of the document's filter. Clipboard::import_into and import_text_styles return a Result, and their callers pass the error on before the document changes.
This commit is contained in:
@@ -1332,7 +1332,7 @@ fn paste_clip(s: &mut Session, p: &Value, mode: PasteMode, clip: &Clipboard, cho
|
||||
vec![Affine::IDENTITY]
|
||||
};
|
||||
let (ids, imported, artboards, into) = s.edit(mode.label(), |d, sel| {
|
||||
let imported = clip.import_into(d, choices, same_doc);
|
||||
let imported = clip.import_into(d, choices, same_doc)?;
|
||||
// Draw Inside: the clip group of the object drawn into, made on the first paste.
|
||||
let into = inside.map(|t| super::create::draw_inside_group(d, t)).transpose()?;
|
||||
let artboards: Vec<usize> = boards
|
||||
|
||||
Reference in New Issue
Block a user