mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 20:01:43 +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:
+2
-1
@@ -3764,7 +3764,8 @@ what every object that uses it draws, in the edit's one undo step, and an applic
|
||||
filter. Deleting a filter that objects use leaves their effects in place, still named, drawing nothing (their `xml`
|
||||
empty) until a filter of that name is defined or imported again. A pasted effect that names one of the document's
|
||||
filters but draws another definition keeps its own filter under a free name (`Soft 2`); pasted back into the document
|
||||
it was copied from, it takes the document's filter. Opened from such an effect, Apply SVG Filter shows the
|
||||
it was copied from, it takes the document's filter. The free name is one that no filter of the document and no effect in
|
||||
its art, brushes or graphic styles uses; when no such name keeps the filter within 64 KB, the paste is refused. Opened from such an effect, Apply SVG Filter shows the
|
||||
name above the list, not selectable. `effect.apply {effect: "svg.filter", params: {xml}}` takes a filter
|
||||
directly and names it by its `id`; an `xml` that isn't one such filter is an error. `ui.svgFilterDialog {}` opens Apply
|
||||
SVG Filter (New, Edit, Delete, Import…), and from the Appearance panel it edits which filter an applied effect runs;
|
||||
|
||||
Reference in New Issue
Block a user