forked from mirrors/NBTExplorer
Fix crash when refreshing nodes with list tag on modified path.
This commit is contained in:
parent
6412629678
commit
2a043ba09c
1 changed files with 3 additions and 11 deletions
|
@ -219,10 +219,7 @@ namespace NBTExplorer.Model
|
|||
foreach (DataNode child in node.Nodes) {
|
||||
Dictionary<string, object> 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<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodeName];
|
||||
if (childDict != null)
|
||||
RestoreExpandSet(child, childDict);
|
||||
}
|
||||
else if (expandSet.ContainsKey(child.NodeDisplay)) {
|
||||
Dictionary<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodeDisplay];
|
||||
if (expandSet.ContainsKey(child.NodePathName)) {
|
||||
Dictionary<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodePathName];
|
||||
if (childDict != null)
|
||||
RestoreExpandSet(child, childDict);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue