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

Obtain fileformat from archive roots for additional file menus.

This commit is contained in:
KillzXGaming 2019-12-31 21:20:48 -05:00
parent e122021cdc
commit d26f2373ac

View File

@ -466,9 +466,16 @@ namespace Toolbox.Library.Forms
private IFileFormat TryGetActiveFile(TreeNode node)
{
if (node.Tag != null && node.Tag is IFileFormat)
return (IFileFormat)node.Tag;
return (IFileFormat)node.Tag;
else if (node is IFileFormat)
return (IFileFormat)node;
else if (node is ArchiveRootNodeWrapper)
{
if (((ArchiveRootNodeWrapper)node).ArchiveFile is IFileFormat)
return ((ArchiveRootNodeWrapper)node).ArchiveFile as IFileFormat;
else
return null;
}
else
return null;
}