Skip to content
Snippets Groups Projects
Commit 9e6cac81 authored by pompert's avatar pompert
Browse files

BugID: 725

Additions:
-None
Mods:
-Altered the defineChildsForNode method to set the childsDefined boolean in the parmDBnode to true to prevent infinite loops
-modified the constructor for child treenodes to include the full name in the TreeNode.name variable.
parent 12e065c5
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,11 @@ public class ParmDBTreeManager extends GenericTreeManager implements ITreeManage
logger.trace("Entry - TreeManager jParmDBnode-defineChildNodes("+toString()+")");
try {
// You must set the flag before defining children if you
// use "add" for the new children. Otherwise you get an infinite
// recursive loop, since add results in a call to getChildCount.
// However, you could use "insert" in such a case.
aNode.areChildrenDefined = true;
Vector childs;
if(((jParmDBnode)aNode.getUserObject()).name.equalsIgnoreCase("ParmDB")){
logger.trace("ParmDBtreeNode calling getNames("+((jParmDBnode)aNode.getUserObject()).nodeID().substring(6)+"*)");
......@@ -104,7 +109,7 @@ public class ParmDBTreeManager extends GenericTreeManager implements ITreeManage
item.name = childName;
logger.trace("Node name selected : "+item.name);
((jParmDBnode)aNode.getUserObject()).leaf=false;
TreeNode newNode = new TreeNode(this.instance,item,item.name);
TreeNode newNode = new TreeNode(this.instance,item,item.nodeID());
aNode.add(newNode);
TreeModelEvent evt = new TreeModelEvent(newNode,newNode.getPath());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment