Fix bug with empty scopes appearing with no parents

Not sure hiding empty scopes adds much, but it certainly does mess with the
current algorithm
This commit is contained in:
Clément Fournier
2018-04-01 18:23:22 +02:00
parent 930bdd235c
commit dcf1a94cf8

View File

@@ -65,14 +65,10 @@ public final class ScopeHierarchyTreeItem extends TreeItem<Object> {
ScopeHierarchyTreeItem parent = buildAscendantHierarchyHelper(scope.getParent());
if (parent == null) {
return scopeTreeNode;
} else {
if (scopeTreeNode.getChildren().size() > 0) { // hides empty scopes
parent.getChildren().add(scopeTreeNode);
}
return scopeTreeNode;
if (parent != null) {
parent.getChildren().add(scopeTreeNode);
}
return scopeTreeNode;
}