Jelajahi Sumber

Fixed clip on svg export

Krzysztof Krysiński 2 hari lalu
induk
melakukan
fd2c84d11b

+ 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()
             {