From a8766eb2762c5ca437e4b362603abdf74caf37ae Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 17 Jul 2013 11:19:28 -0500 Subject: [PATCH] IDEMPIERE-1170 Cannot Drag Tree Item After Insert New Record --- .../src/org/adempiere/webui/adwindow/ADTabpanel.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 2436d63623..b4af00a3d2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -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()) {