Browse Source

Fixed that no layer is selected when a document is opened

CPKreuz 4 years ago
parent
commit
a442edc452
1 changed files with 5 additions and 0 deletions
  1. 5 0
      PixiEditor/Helpers/Extensions/ParserHelpers.cs

+ 5 - 0
PixiEditor/Helpers/Extensions/ParserHelpers.cs

@@ -20,6 +20,11 @@ namespace PixiEditor.Helpers.Extensions
                     Color.FromArgb(x.Item1, x.Item2, x.Item3, x.Item4)))
             };
 
+            if (document.Layers.Count > 0)
+            {
+                document.SetMainActiveLayer(0);
+            }
+
             return document;
         }