protected override TreeViewItem BuildRoot() { if (rootNode == null) { BuildNodeTree(); var expanded = new List <int>(); GetDefaultExpandedIds(rootNode, expanded); expanded.Sort(); state.expandedIDs = expanded; } var root = rootNode.BuildList(getShowInactiveSystems()); if (!root.hasChildren) { root.children = new List <TreeViewItem>(0); } if (getWorldSelection() != null) { root.children.Insert(0, new TreeViewItem(kAllEntitiesItemId, 0, $"All Entities ({getWorldSelection().Name})")); } root.depth = -1; SetupDepthsFromParentsAndChildren(root); return(root); }
protected override TreeViewItem BuildRoot() { if (rootNode == null) { state.expandedIDs = BuildNodeTree(); } var root = rootNode.BuildList(getShowInactiveSystems()); if (!root.hasChildren) { root.children = new List <TreeViewItem>(0); } SetupDepthsFromParentsAndChildren(root); return(root); }