From 043983fdade3561f142aad6ea947b47e05d54f07 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Thu, 18 Jul 2019 16:52:46 -0400 Subject: [PATCH] Set the file format instance on editor load for saving back --- Switch_Toolbox_Library/Forms/Archive/ArchiveFilePanel.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Switch_Toolbox_Library/Forms/Archive/ArchiveFilePanel.cs b/Switch_Toolbox_Library/Forms/Archive/ArchiveFilePanel.cs index 8584904a..acfe02a7 100644 --- a/Switch_Toolbox_Library/Forms/Archive/ArchiveFilePanel.cs +++ b/Switch_Toolbox_Library/Forms/Archive/ArchiveFilePanel.cs @@ -89,11 +89,8 @@ namespace Toolbox.Library.Forms return; } + ArchiveFileInfo.FileFormat = File; SetEditorForm(File); - - //If the format isn't active we can just dispose it - if (ArchiveFileInfo.FileFormat == null) - File.Unload(); } private bool CheckActiveType(Type type) @@ -162,6 +159,8 @@ namespace Toolbox.Library.Forms } else editor.FillEditor(ArchiveFileInfo.FileData); + + ArchiveFileInfo.FileFormat = File; } private void NotifyFormatSwitched()