Browse Source

Fixed blend mode deserialization

Krzysztof Krysiński 2 years ago
parent
commit
97f77f09e4

+ 1 - 2
src/PixiEditor/Helpers/Extensions/PixiParserDocumentEx.cs

@@ -10,8 +10,7 @@ internal static class PixiParserDocumentEx
     {
     {
         return DocumentViewModel.Build(b =>
         return DocumentViewModel.Build(b =>
         {
         {
-            b
-                .WithSize(document.Width, document.Height)
+            b.WithSize(document.Width, document.Height)
                 .WithPalette(document.Palette, x => new Color(x.R, x.G, x.B, x.A))
                 .WithPalette(document.Palette, x => new Color(x.R, x.G, x.B, x.A))
                 .WithSwatches(document.Swatches, x => new(x.R, x.G, x.B, x.A));
                 .WithSwatches(document.Swatches, x => new(x.R, x.G, x.B, x.A));
 
 

+ 1 - 1
src/PixiEditor/PixiEditor.csproj

@@ -218,7 +218,7 @@
 		<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta2" />
 		<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta2" />
 		<PackageReference Include="OneOf" Version="3.0.223" />
 		<PackageReference Include="OneOf" Version="3.0.223" />
 		<PackageReference Include="PixiEditor.ColorPicker" Version="3.3.1" />
 		<PackageReference Include="PixiEditor.ColorPicker" Version="3.3.1" />
-		<PackageReference Include="PixiEditor.Parser" Version="3.0.0" />
+		<PackageReference Include="PixiEditor.Parser" Version="3.0.1" />
 		<PackageReference Include="PixiEditor.Parser.Skia" Version="3.0.0" />
 		<PackageReference Include="PixiEditor.Parser.Skia" Version="3.0.0" />
 		<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
 		<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
 		<PackageReference Include="WpfAnimatedGif" Version="2.0.2" />
 		<PackageReference Include="WpfAnimatedGif" Version="2.0.2" />

+ 2 - 0
src/PixiEditor/ViewModels/SubViewModels/Document/DocumentViewModel.cs

@@ -215,6 +215,8 @@ internal partial class DocumentViewModel : NotifyableObject
 
 
             if (!member.IsVisible)
             if (!member.IsVisible)
                 acc.AddActions(new StructureMemberIsVisible_Action(member.IsVisible, member.GuidValue));
                 acc.AddActions(new StructureMemberIsVisible_Action(member.IsVisible, member.GuidValue));
+            
+            acc.AddActions(new StructureMemberBlendMode_Action(member.BlendMode, member.GuidValue));
 
 
             if (member is DocumentViewModelBuilder.LayerBuilder layer && layer.Surface is not null)
             if (member is DocumentViewModelBuilder.LayerBuilder layer && layer.Surface is not null)
             {
             {