Obtain fileformat from archive roots for additional file menus.
This commit is contained in:
parent
e122021cdc
commit
d26f2373ac
@ -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 New Issue
Block a user