IDEMPIERE-1170 Cannot Drag Tree Item After Insert New Record

This commit is contained in:
Carlos Ruiz 2013-07-17 11:19:28 -05:00
parent 54862b0d9e
commit a8766eb276
1 changed files with 1 additions and 8 deletions

View File

@ -1216,14 +1216,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
}else if(e.isInserting() && gridTab.getRecord_ID() < 0 && gridTab.getTabLevel() > 0 )
{
int AD_Tree_ID = Integer.parseInt(gridTab.getParentTab().getValue("AD_Tree_ID").toString());
MTreeNode root = new MTree (Env.getCtx(), AD_Tree_ID, true, true, null).getRoot();
SimpleTreeModel treeModel = SimpleTreeModel.createFrom(root);
try {
treePanel.getTree().setItemRenderer(treeModel);
treePanel.getTree().setModel(treeModel);
} catch (Exception treeExc) {
logger.log(Level.SEVERE, "Failed to setup tree");
}
treePanel.initTree(AD_Tree_ID, windowNo);
}
}
if (listPanel.isVisible()) {