From ef6102b0f4376b47ddb54b9834afbe46043b8722 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Thu, 4 Oct 2012 21:57:03 -0400 Subject: [PATCH] Fixed bug where collapsed subnodes cannot be expanded again --- MainForm.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MainForm.cs b/MainForm.cs index 3d7b0ce..040e459 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -197,13 +197,16 @@ namespace NBTExplorer OpenPaths(new string[] { path }); } - catch (Exception) { + catch (Exception e) { MessageBox.Show("Could not open default Minecraft save directory"); + Console.WriteLine(e.Message); + try { OpenPaths(new string[] { Directory.GetCurrentDirectory() }); } catch (Exception) { MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform."); + Console.WriteLine(e.Message); Application.Exit(); } } @@ -219,7 +222,7 @@ namespace NBTExplorer frontNode.Tag = node; frontNode.ContextMenuStrip = BuildNodeContextMenu(node); - if (node.HasUnexpandedChildren) + if (node.HasUnexpandedChildren || node.Nodes.Count > 0) frontNode.Nodes.Add(new TreeNode()); return frontNode;