mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-10 01:46:24 +00:00
Sorting on NBT File Node contents
This commit is contained in:
parent
563ca5b0a5
commit
22a14a9554
1 changed files with 5 additions and 11 deletions
|
@ -90,8 +90,6 @@ namespace NBTExplorer.Model
|
||||||
get { return !IsExpanded; }
|
get { return !IsExpanded; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//private TagNodeCompound _metaRoot;
|
|
||||||
|
|
||||||
protected override void ExpandCore ()
|
protected override void ExpandCore ()
|
||||||
{
|
{
|
||||||
if (_tree == null) {
|
if (_tree == null) {
|
||||||
|
@ -99,21 +97,17 @@ namespace NBTExplorer.Model
|
||||||
_tree = new NbtTree();
|
_tree = new NbtTree();
|
||||||
_tree.ReadFrom(file.GetDataInputStream(_compressionType));
|
_tree.ReadFrom(file.GetDataInputStream(_compressionType));
|
||||||
|
|
||||||
//_metaRoot = new TagNodeCompound();
|
|
||||||
|
|
||||||
if (_tree.Root != null) {
|
if (_tree.Root != null) {
|
||||||
//_metaRoot.Add(_tree.Name, _tree.Root);
|
|
||||||
_container = new CompoundTagContainer(_tree.Root);
|
_container = new CompoundTagContainer(_tree.Root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*foreach (TagNode tag in _metaRoot.Values) {
|
var list = new SortedList<TagKey, TagNode>();
|
||||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
foreach (var item in _tree.Root) {
|
||||||
if (node != null)
|
list.Add(new TagKey(item.Key, item.Value.GetTagType()), item.Value);
|
||||||
Nodes.Add(node);
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
foreach (TagNode tag in _tree.Root.Values) {
|
foreach (TagNode tag in list.Values) {
|
||||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||||
if (node != null)
|
if (node != null)
|
||||||
Nodes.Add(node);
|
Nodes.Add(node);
|
||||||
|
|
Loading…
Reference in a new issue