1
0
mirror of synced 2024-12-02 02:57:23 +01:00

Fix missing root entry in byaml editor

This commit is contained in:
KillzXGaming 2019-04-20 15:36:41 -04:00
parent c661b10d12
commit 0c9d9853d8
4 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -77,10 +77,15 @@ namespace FirstPlugin
void ParseBymlFirstNode()
{
TreeNode root = new TreeNode("root");
root.Tag = byml;
treeView1.Nodes.Add(root);
treeView1.SelectedNode = root;
//the first node should always be a dictionary node
if (byml is Dictionary<string, dynamic>)
{
parseDictNode(byml, treeView1.Nodes);
parseDictNode(byml, root.Nodes);
}
else if (byml is List<dynamic>)
{
@ -88,7 +93,7 @@ namespace FirstPlugin
{
MessageBox.Show("This byml is empty");
}
parseArrayNode(byml, treeView1.Nodes);
parseArrayNode(byml, root.Nodes);
}
else if (byml is List<ByamlPathPoint>)
{