Hide sub-tree when parent is hidden.

This commit is contained in:
Alec Thomas
2018-11-14 10:01:45 +11:00
parent 010e3134ca
commit aedca401da
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ func (n *Node) Leaves(hide bool) (out []*Node) {
}
if node, ok := nd.(*Node); ok {
if hide && node.Hidden {
return next(nil)
return nil
}
if len(node.Children) == 0 && node.Type != ApplicationNode {
out = append(out, node)