From 6dc7a4b410368e38096d0e5aa037e6d9a395fddf Mon Sep 17 00:00:00 2001 From: MattNL Date: Sat, 1 Oct 2022 16:45:50 -0400 Subject: [PATCH] Fixed set frame index issue in AnimationEditor --- PCK-Studio/Forms/Editor/AnimationEditor.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.cs b/PCK-Studio/Forms/Editor/AnimationEditor.cs index 3aba640b..bc9272f9 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.cs @@ -423,7 +423,11 @@ namespace PckStudio.Forms.Editor using FrameEditor diag = new FrameEditor(frame.Ticks, currentAnimation.GetFrameIndex(frame.Texture), currentAnimation.FrameTextureCount-1); if (diag.ShowDialog(this) == DialogResult.OK) { - currentAnimation.SetFrame(frame, diag.FrameTextureIndex, diag.FrameTime); + /* Found a bug here. When passing the frame variable, it would replace the first instance of that frame and time + * rather than the actual frame that was clicked. I've just switched to passing the index to fix this for now. -Matt + */ + + currentAnimation.SetFrame(frameTreeView.SelectedNode.Index, diag.FrameTextureIndex, diag.FrameTime); LoadAnimationTreeView(); } }