Переглянути джерело

Fixed merging losing some settings

flabbet 8 місяців тому
батько
коміт
7f4e276cc6

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Shapes/Data/PathVectorData.cs

@@ -10,7 +10,7 @@ namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes.Shapes.Data;
 
 public class PathVectorData : ShapeVectorData, IReadOnlyPathData
 {
-    public VectorPath Path { get; private set; }
+    public VectorPath Path { get; set; }
     public override RectD GeometryAABB => Path.TightBounds;
     public override RectD VisualAABB => GeometryAABB.Inflate(StrokeWidth / 2);
 

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Shapes/Data/ShapeVectorData.cs

@@ -45,7 +45,7 @@ public abstract class ShapeVectorData : ICacheable, ICloneable, IReadOnlyShapeVe
         return copy;
     }
 
-    protected virtual void AdjustCopy(ShapeVectorData copy) {}
+    protected virtual void AdjustCopy(ShapeVectorData copy) { }
 
     public override int GetHashCode()
     {

+ 2 - 6
src/PixiEditor.ChangeableDocument/Changes/Drawing/CombineStructureMembersOnto_Change.cs

@@ -188,12 +188,8 @@ internal class CombineStructureMembersOnto_Change : Change
             }
         }
 
-        var pathData = new PathVectorData(targetPath)
-        {
-            StrokeWidth = targetData.StrokeWidth,
-            StrokeColor = targetData.StrokeColor,
-            FillColor = targetData.FillColor
-        };
+        var pathData = (PathVectorData)targetData.Clone();
+        pathData.Path = targetPath;
 
         vectorLayer.ShapeData = pathData;