From 2a043ba09c5406326bcacb693e5123870afea926 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Tue, 1 Apr 2014 22:21:38 -0400 Subject: [PATCH] Fix crash when refreshing nodes with list tag on modified path. --- NBTModel/Data/Nodes/DataNode.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/NBTModel/Data/Nodes/DataNode.cs b/NBTModel/Data/Nodes/DataNode.cs index 74b7eb6..e4264fd 100644 --- a/NBTModel/Data/Nodes/DataNode.cs +++ b/NBTModel/Data/Nodes/DataNode.cs @@ -219,10 +219,7 @@ namespace NBTExplorer.Model foreach (DataNode child in node.Nodes) { Dictionary childDict = BuildExpandSet(child); if (childDict != null) { - if (!String.IsNullOrEmpty(child.NodeName)) - dict[child.NodeName] = childDict; - else - dict[child.NodeDisplay] = childDict; + dict[child.NodePathName] = childDict; } } @@ -237,13 +234,8 @@ namespace NBTExplorer.Model node.Expand(); foreach (DataNode child in node.Nodes) { - if (expandSet.ContainsKey(child.NodeName)) { - Dictionary childDict = (Dictionary)expandSet[child.NodeName]; - if (childDict != null) - RestoreExpandSet(child, childDict); - } - else if (expandSet.ContainsKey(child.NodeDisplay)) { - Dictionary childDict = (Dictionary)expandSet[child.NodeDisplay]; + if (expandSet.ContainsKey(child.NodePathName)) { + Dictionary childDict = (Dictionary)expandSet[child.NodePathName]; if (childDict != null) RestoreExpandSet(child, childDict); }