destroy the sprite if we were doing a preview
This commit is contained in:
parent
6e2661a648
commit
0389b3a759
@ -432,6 +432,7 @@ namespace SpriteLibrary
|
|||||||
|
|
||||||
private void WeHaveNewItem()
|
private void WeHaveNewItem()
|
||||||
{
|
{
|
||||||
|
if (PreviewSprite != null) PreviewSprite.Destroy();
|
||||||
TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]);
|
TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]);
|
||||||
SpriteInformationToForm();
|
SpriteInformationToForm();
|
||||||
UpdateMenu();
|
UpdateMenu();
|
||||||
@ -441,7 +442,9 @@ namespace SpriteLibrary
|
|||||||
if (nindex < 0) return;
|
if (nindex < 0) return;
|
||||||
if (nindex >= SpriteInformation.Count) return;
|
if (nindex >= SpriteInformation.Count) return;
|
||||||
CurrentSIIndex = nindex;
|
CurrentSIIndex = nindex;
|
||||||
|
if (PreviewSprite != null) PreviewSprite.Destroy();
|
||||||
TempInformation = SpriteInformation[nindex].Clone();
|
TempInformation = SpriteInformation[nindex].Clone();
|
||||||
|
CurrentSIAnimation = 0; //always start at animation 0
|
||||||
WeHaveNewItem();
|
WeHaveNewItem();
|
||||||
UpdateMenu();
|
UpdateMenu();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user