Преглед на файлове

Fixed clip on svg export

Krzysztof Krysiński преди 2 дни
родител
ревизия
fd2c84d11b
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/PixiEditor/ViewModels/Document/DocumentViewModel.Serialization.cs

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