Make sure the preview sprite updates properly.
This commit is contained in:
parent
35133e64b7
commit
8bf6378246
@ -515,7 +515,11 @@ namespace SpriteLibrary
|
|||||||
|
|
||||||
private void WeHaveNewItem()
|
private void WeHaveNewItem()
|
||||||
{
|
{
|
||||||
if (PreviewSprite != null) PreviewSprite.Destroy();
|
if (PreviewSprite != null)
|
||||||
|
{
|
||||||
|
PreviewSprite.Destroy();
|
||||||
|
PreviewSprite = null;
|
||||||
|
}
|
||||||
if (CurrentSIIndex >= 0 && CurrentSIIndex < SpriteInformation.Count)
|
if (CurrentSIIndex >= 0 && CurrentSIIndex < SpriteInformation.Count)
|
||||||
TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]);
|
TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]);
|
||||||
else
|
else
|
||||||
@ -626,7 +630,7 @@ namespace SpriteLibrary
|
|||||||
|
|
||||||
private void btnPreviewAnimBack_Click(object sender, EventArgs e)
|
private void btnPreviewAnimBack_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (PreviewSprite != null)
|
if (PreviewSprite != null && !PreviewSprite.Destroying)
|
||||||
{
|
{
|
||||||
int Animations = PreviewSprite.AnimationCount;
|
int Animations = PreviewSprite.AnimationCount;
|
||||||
int NextAnim = PreviewSprite.AnimationIndex - 1;
|
int NextAnim = PreviewSprite.AnimationIndex - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user