Browse Source

Now properly fixed previous bug

flabbet 3 years ago
parent
commit
aaefba35b3
1 changed files with 1 additions and 3 deletions
  1. 1 3
      PixiEditor/Models/Undo/StorageBasedChange.cs

+ 1 - 3
PixiEditor/Models/Undo/StorageBasedChange.cs

@@ -260,9 +260,7 @@ namespace PixiEditor.Models.Undo
                 for (int i = 0; i < layers.Length; i++)
                 {
                     Layer layer = layers[i];
-                    document.Layers.SuppressNotify = true;
-                    document.Layers.RemoveAt(data[i].LayerIndex);
-                    document.Layers.SuppressNotify = false;
+                    document.RemoveLayer(data[i].LayerIndex, false);
 
                     document.Layers.Insert(data[i].LayerIndex, layer);