GP-0: fix for adds to NodeMap with null parent (!= root)

This commit is contained in:
d-millar
2021-05-05 15:16:46 +00:00
parent e6fd14f88c
commit 84c77bb90c
2 changed files with 4 additions and 1 deletions

View File

@@ -59,7 +59,9 @@ public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode
public void setContainer(ObjectTree tree, ObjectContainer parent, ObjectContainer container) {
this.container = container;
name = container.getName();
tree.addToMap(parent, container, this);
if (parent != null) {
tree.addToMap(parent, container, this);
}
//fireNodeStructureChanged(this);
}

View File

@@ -68,6 +68,7 @@ public class ObjectTree implements ObjectPane {
public ObjectTree(ObjectContainer container) {
this.root = new ObjectNode(this, null, container);
addToMap(null, container, root);
this.tree = new GTree(root);
this.listingService = container.getProvider().getListingService();