Fixed set frame index issue in AnimationEditor

This commit is contained in:
MattNL
2022-10-01 16:45:50 -04:00
parent d9365ace99
commit 6dc7a4b410

View File

@@ -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();
}
}