Sfoglia il codice sorgente

Merge pull request #1194 from PixiEditor/fix-clip-svg

Fixed clip on svg export
Krzysztof Krysiński 1 giorno fa
parent
commit
efdda8b36f

+ 3 - 1
src/PixiEditor/ViewModels/Document/DocumentViewModel.Serialization.cs

@@ -171,7 +171,9 @@ internal partial class DocumentViewModel
         if (previousElement != null)
         {
             var clone = previousElement.Clone();
-            (clone as SvgPrimitive).ClipPath.Unit = null;
+            if(clone is not IClipable clipable)
+                return;
+            clipable.ClipPath.Unit = null;
             clone.Id.Unit = null;
             defs.Children.Add(new SvgClipPath()
             {