mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-15 09:27:08 +00:00
Obtain fileformat from archive roots for additional file menus.
This commit is contained in:
parent
e122021cdc
commit
d26f2373ac
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue