diff --git a/SpriteLibrary/SpriteEntryForm.cs b/SpriteLibrary/SpriteEntryForm.cs index a30b2d7..d17e286 100644 --- a/SpriteLibrary/SpriteEntryForm.cs +++ b/SpriteLibrary/SpriteEntryForm.cs @@ -527,6 +527,22 @@ namespace SpriteLibrary { if (!VerifySpriteBeforeSaving()) return; FormToSpriteInformation(); + //Copy information from the frame we are based off of. This makes the visible selection + //equal to the one it is a copy of. + if(CurrentSIAnimation >=0 && TempInformation.Animations[CurrentSIAnimation].FieldsToUse != AnimationType.SpriteDefinition) + { + int which = TempInformation.Animations[CurrentSIAnimation].AnimationToUse; + if (which >= 0 && which < TempInformation.Animations.Count) + { + AnimationInfo oAI = TempInformation.Animations[TempInformation.Animations[CurrentSIAnimation].AnimationToUse]; + AnimationInfo nAI = TempInformation.Animations[CurrentSIAnimation]; + nAI.ImageName = oAI.ImageName; + nAI.StartPoint = oAI.StartPoint; + nAI.Width = oAI.Width; + nAI.Height = oAI.Height; + nAI.NumFrames = oAI.NumFrames; + } + } if (CurrentSIIndex > 0 && CurrentSIIndex < SpriteInformation.Count) { SpriteInformation[CurrentSIIndex].CopyFrom(TempInformation);