1
0
mirror of synced 2025-01-19 09:17:30 +01:00

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) if (result == DialogResult.Yes)
{ {
foreach (var node in Nodes) foreach (TreeNode node in Nodes)
{ {
if (node is STGenericWrapper) if (node is STGenericWrapper)
{ {
((STGenericWrapper)node).Unload(); ((STGenericWrapper)node).Unload();
RemoveChild(((STGenericWrapper)node)); RemoveChild(((STGenericWrapper)node));
ResourceNodes.Remove(node.Text);
} }
} }

View File

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