Remove all resource data from ftex clearing to prevent key issues

This commit is contained in:
KillzXGaming 2019-04-21 14:35:26 -04:00
parent d93fe604be
commit 23465c5e5b
5 changed files with 8 additions and 1 deletions

Binary file not shown.

View file

@ -396,12 +396,13 @@ namespace Bfres.Structs
if (result == DialogResult.Yes)
{
foreach (var node in Nodes)
foreach (TreeNode node in Nodes)
{
if (node is STGenericWrapper)
{
((STGenericWrapper)node).Unload();
RemoveChild(((STGenericWrapper)node));
ResourceNodes.Remove(node.Text);
}
}

View file

@ -129,6 +129,12 @@ namespace Bfres.Structs
return importer;
}
public override void Unload()
{
DisposeRenderable();
Nodes.Clear();
}
public void ReplaceImage(Image image, string FileName)
{
GTXImporterSettings setting = SetImporterSettings(image, FileName);