Make sure we respect the expanded state of the sections when rebuilding the shadow table

This commit is contained in:
Maurice Parker 2019-09-08 08:55:07 -05:00
parent 9dc8f8d37a
commit 7f4027a527

View File

@ -1045,8 +1045,10 @@ private extension SceneCoordinator {
for i in 0..<treeController.rootNode.numberOfChildNodes { for i in 0..<treeController.rootNode.numberOfChildNodes {
var result = [Node]() var result = [Node]()
if let nodes = treeController.rootNode.childAtIndex(i)?.childNodes { let sectionNode = treeController.rootNode.childAtIndex(i)!
for node in nodes {
if expandedNodes.contains(sectionNode) {
for node in sectionNode.childNodes {
result.append(node) result.append(node)
if expandedNodes.contains(node) { if expandedNodes.contains(node) {
for child in node.childNodes { for child in node.childNodes {