1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Another fix for replacing

This commit is contained in:
KillzXGaming 2020-05-17 20:40:04 -04:00
parent bcf7e9468b
commit e5a26bb4f1

View File

@ -973,18 +973,17 @@ namespace Toolbox.Library
{
var prevNode = (TreeNode)ArchiveFileInfo.FileFormat;
var parent = prevNode.Parent;
if (parent == null) return;
var index = parent.Nodes.IndexOf(prevNode);
parent.Nodes.RemoveAt(index);
parent.Nodes.Insert(index, this);
if (parent != null)
{
var index = parent.Nodes.IndexOf(prevNode);
parent.Nodes.RemoveAt(index);
parent.Nodes.Insert(index, this);
}
}
ArchiveFileInfo.FileFormat.Unload();
ArchiveFileInfo.FileFormat = null;
Nodes.Clear();
ArchiveFileInfo.FileFormat = ArchiveFileInfo.OpenFile();
OpenFileFormat(TreeView);
}
@ -1141,6 +1140,9 @@ namespace Toolbox.Library
public void UpdateEditor()
{
if (ArchiveFileInfo.FileFormat != null)
Console.WriteLine($"UpdateEditor {ArchiveFileInfo.FileFormat.FileName}");
ArchiveFilePanel editor = (ArchiveFilePanel)LibraryGUI.GetActiveContent(typeof(ArchiveFilePanel));
if (editor == null)
{