浏览代码

Don't ignore active frame in undo

flabbet 1 年之前
父节点
当前提交
92a7faeb64
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/PixiEditor.ChangeableDocument/Changes/Animation/ActiveFrame_UpdateableChange.cs

+ 2 - 2
src/PixiEditor.ChangeableDocument/Changes/Animation/ActiveFrame_UpdateableChange.cs

@@ -11,7 +11,6 @@ internal class ActiveFrame_UpdateableChange : UpdateableChange
     public ActiveFrame_UpdateableChange(int activeFrame)
     {
         newFrame = activeFrame;
-        originalFrame = activeFrame;
     }
     
     [UpdateChangeMethod]
@@ -22,6 +21,7 @@ internal class ActiveFrame_UpdateableChange : UpdateableChange
     
     public override bool InitializeAndValidate(Document target)
     {
+        originalFrame = target.AnimationData.ActiveFrame;
         return true;
     }
     
@@ -37,7 +37,7 @@ internal class ActiveFrame_UpdateableChange : UpdateableChange
 
     public override OneOf<None, IChangeInfo, List<IChangeInfo>> Apply(Document target, bool firstApply, out bool ignoreInUndo)
     {
-        ignoreInUndo = true;
+        ignoreInUndo = false;
         if (target.AnimationData.ActiveFrame == newFrame)
         {
             return new None();