Fixed regression in node controller preventing creation of new nodes.

This commit is contained in:
Justin Aquadro 2013-11-01 22:18:20 -04:00
parent ae03136b5b
commit 85ca29cb79

View file

@ -183,13 +183,13 @@ namespace NBTExplorer.Controllers
public void CreateNode (TagType type) public void CreateNode (TagType type)
{ {
if (_nodeTree.Nodes == null || _nodeTree.Nodes.Count == 0) if (SelectedNode == null || _nodeTree.Nodes.Count == 0)
return; return;
if (_nodeTree.SelectedNode == null) if (SelectedNode == null)
CreateNode(_nodeTree.Nodes[0], type); CreateNode(_nodeTree.Nodes[0], type);
else else
CreateNode(_nodeTree.SelectedNode, type); CreateNode(SelectedNode, type);
} }
public void DeleteNode (TreeNode node) public void DeleteNode (TreeNode node)