More fixes
This commit is contained in:
parent
cd068828ba
commit
e8283ac4ee
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -95,12 +95,13 @@ namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
var Editor = ((TreeNodeFile)fileFormat).GetEditor();
|
||||
var ActiveEditor = GetActiveEditor(Editor.GetType());
|
||||
if (ActiveEditor != null)
|
||||
if (ActiveEditor == null)
|
||||
AddControl(Editor);
|
||||
else
|
||||
Editor = ActiveEditor;
|
||||
|
||||
((TreeNodeFile)fileFormat).FillEditor(Editor);
|
||||
|
||||
AddControl(Editor);
|
||||
}
|
||||
|
||||
Type objectType = fileFormat.GetType();
|
||||
@ -111,10 +112,10 @@ namespace Switch_Toolbox.Library.Forms
|
||||
System.Reflection.MethodInfo method = objectType.GetMethod("OpenForm");
|
||||
var Editor = (UserControl)method.Invoke(fileFormat, new object[0]);
|
||||
var ActiveEditor = GetActiveEditor(Editor.GetType());
|
||||
if (ActiveEditor != null)
|
||||
if (ActiveEditor == null)
|
||||
AddControl(Editor);
|
||||
else
|
||||
Editor = ActiveEditor;
|
||||
|
||||
AddControl(Editor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,12 +110,15 @@ namespace Switch_Toolbox.Library.Forms
|
||||
AddNode(FileRoot);
|
||||
}
|
||||
|
||||
//The process takes awhile atm so limit splitting if there's a high amount
|
||||
private readonly int MAX_FILE_PATH_SPLIT = 5000;
|
||||
|
||||
void FillTreeNodes(TreeNode root, IArchiveFile archiveFile)
|
||||
{
|
||||
var rootText = root.Text;
|
||||
var rootTextLength = rootText.Length;
|
||||
var nodeFiles = archiveFile.Files;
|
||||
if (nodeFiles.Count() > 400)
|
||||
if (nodeFiles.Count() > MAX_FILE_PATH_SPLIT)
|
||||
{
|
||||
foreach (var node in nodeFiles)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user