mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-09 17:36:25 +00:00
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) {
|
foreach (DataNode child in node.Nodes) {
|
||||||
Dictionary<string, object> childDict = BuildExpandSet(child);
|
Dictionary<string, object> childDict = BuildExpandSet(child);
|
||||||
if (childDict != null) {
|
if (childDict != null) {
|
||||||
if (!String.IsNullOrEmpty(child.NodeName))
|
dict[child.NodePathName] = childDict;
|
||||||
dict[child.NodeName] = childDict;
|
|
||||||
else
|
|
||||||
dict[child.NodeDisplay] = childDict;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,13 +234,8 @@ namespace NBTExplorer.Model
|
||||||
node.Expand();
|
node.Expand();
|
||||||
|
|
||||||
foreach (DataNode child in node.Nodes) {
|
foreach (DataNode child in node.Nodes) {
|
||||||
if (expandSet.ContainsKey(child.NodeName)) {
|
if (expandSet.ContainsKey(child.NodePathName)) {
|
||||||
Dictionary<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodeName];
|
Dictionary<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodePathName];
|
||||||
if (childDict != null)
|
|
||||||
RestoreExpandSet(child, childDict);
|
|
||||||
}
|
|
||||||
else if (expandSet.ContainsKey(child.NodeDisplay)) {
|
|
||||||
Dictionary<string, object> childDict = (Dictionary<string, object>)expandSet[child.NodeDisplay];
|
|
||||||
if (childDict != null)
|
if (childDict != null)
|
||||||
RestoreExpandSet(child, childDict);
|
RestoreExpandSet(child, childDict);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue