Set the file format instance on editor load for saving back

This commit is contained in:
KillzXGaming 2019-07-18 16:52:46 -04:00
parent 1a420f65a3
commit 043983fdad

View file

@ -89,11 +89,8 @@ namespace Toolbox.Library.Forms
return; return;
} }
ArchiveFileInfo.FileFormat = File;
SetEditorForm(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) private bool CheckActiveType(Type type)
@ -162,6 +159,8 @@ namespace Toolbox.Library.Forms
} }
else else
editor.FillEditor(ArchiveFileInfo.FileData); editor.FillEditor(ArchiveFileInfo.FileData);
ArchiveFileInfo.FileFormat = File;
} }
private void NotifyFormatSwitched() private void NotifyFormatSwitched()