Make sure the preview sprite updates properly.

This commit is contained in:
Tim Young 2017-09-20 11:25:58 -05:00
parent 35133e64b7
commit 8bf6378246
1 changed files with 6 additions and 2 deletions

View File

@ -515,7 +515,11 @@ namespace SpriteLibrary
private void WeHaveNewItem()
{
if (PreviewSprite != null) PreviewSprite.Destroy();
if (PreviewSprite != null)
{
PreviewSprite.Destroy();
PreviewSprite = null;
}
if (CurrentSIIndex >= 0 && CurrentSIIndex < SpriteInformation.Count)
TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]);
else
@ -626,7 +630,7 @@ namespace SpriteLibrary
private void btnPreviewAnimBack_Click(object sender, EventArgs e)
{
if (PreviewSprite != null)
if (PreviewSprite != null && !PreviewSprite.Destroying)
{
int Animations = PreviewSprite.AnimationCount;
int NextAnim = PreviewSprite.AnimationIndex - 1;