1
0
mirror of synced 2024-11-28 17:30:57 +01:00

Some fixes

This commit is contained in:
KillzXGaming 2019-08-08 20:09:58 -04:00
parent e0dc6bd12d
commit e5de8616d8
5 changed files with 17 additions and 4 deletions

View File

@ -105,6 +105,8 @@ namespace Toolbox.Library.Forms
}
}
public void SelectFirstNode() { if (ObjectTree != null) ObjectTree.SelectFirstNode(); }
public void UpdateTextureIcon(ISingleTextureIconLoader texturIcon) {
ObjectTree.LoadGenericTextureIcons(texturIcon);
}

View File

@ -105,6 +105,8 @@ namespace Toolbox.Library.Forms
}
}
public void SelectFirstNode() { treeViewCustom1.SelectedNode = treeViewCustom1.Nodes[0]; }
private void AddNodes(TreeNode node, bool ClearAllNodes = false)
{
treeViewCustom1.BeginUpdate(); // No visual updates until we say

View File

@ -25,8 +25,8 @@ namespace Toolbox
private static MainForm _instance;
public static MainForm Instance { get { return _instance == null ? _instance = new MainForm() : _instance; } }
IFileFormat[] SupportedFormats { get { return FileManager.GetFileFormats(); } }
IFileMenuExtension[] FileMenuExtensions { get { return FileManager.GetMenuExtensions(); } }
IFileFormat[] SupportedFormats;
IFileMenuExtension[] FileMenuExtensions;
public void AddChildContainer(Form form)
{
@ -100,7 +100,7 @@ namespace Toolbox
Application.Idle += Application_Idle;
/* if (Runtime.UseOpenGL)
if (Runtime.UseOpenGL)
{
ShaderTools.executableDir = Runtime.ExecutableDir;
@ -112,13 +112,14 @@ namespace Toolbox
Runtime.openGLVersion = GL.GetString(StringName.Version);
Runtime.GLSLVersion = GL.GetString(StringName.ShadingLanguageVersion);
ParseGLVersion();
}*/
}
LoadPLugins();
UpdateToolbar(HasVersionFile);
LoadConfig();
LoadMDITheme();
LoadRecentList();
ReloadFiles();
LoadPluginFileContextMenus();
foreach (string file in openedFiles)
@ -136,6 +137,12 @@ namespace Toolbox
}
}
private void ReloadFiles()
{
SupportedFormats = FileManager.GetFileFormats();
FileMenuExtensions = FileManager.GetMenuExtensions();
}
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
{
Exception e = (Exception)args.ExceptionObject;
@ -317,6 +324,8 @@ namespace Toolbox
}
SetFormatSettings(GetActiveIFileFormat());
((ObjectEditor)editor).SelectFirstNode();
}
private void AddObjectEditorFile(TreeNode file, ObjectEditor editor, bool ClearFiles)