diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 16950b06..1ddc8bf0 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index ab4931ff..69b4e969 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 241fcc5e..d007b83a 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs index ead29fec..9006e2fc 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs @@ -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); } } diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FTEX.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FTEX.cs index 72ef3938..4be5b0ac 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FTEX.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FTEX.cs @@ -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);