Krzysztof Krysiński hai 5 meses
pai
achega
04afad74ab

+ 5 - 0
src/PixiEditor.SVG/SvgElement.cs

@@ -65,6 +65,11 @@ public class SvgElement(string tagName)
 
     protected void ParseAttributes(List<SvgProperty> properties, XmlReader reader)
     {
+        if (!properties.Contains(Id))
+        {
+            properties.Insert(0, Id);
+        }
+
         if (!properties.Contains(Style))
         {
             properties.Insert(0, Style);

+ 2 - 0
src/PixiEditor/Models/IO/CustomDocumentFormats/SvgDocumentBuilder.cs

@@ -97,6 +97,8 @@ internal class SvgDocumentBuilder : IDocumentBuilder
             name = TextToolViewModel.NewLayerKey;
         }
 
+        name = element.Id.Unit?.Value ?? name;
+
         AddCommonShapeData(shapeData, styleContext);
 
         NodeGraphBuilder.NodeBuilder nBuilder = graph.WithNodeOfType<VectorLayerNode>(out int id)