From 5c1d614ec932b6679fe4f8ea72b6e7485bd16f4e Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Thu, 20 Sep 2012 13:55:22 +0200 Subject: [PATCH] IDEMPIERE 382 - Swing --- .../src/org/compiere/grid/VTabbedPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java index 78796784d1..846f379e3b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java @@ -272,12 +272,14 @@ public class VTabbedPane extends CTabbedPane if (oldC != null && oldC instanceof GridController) { GridController oldGC = (GridController)oldC; - if (newGC.getTabLevel() > oldGC.getTabLevel()+1) + if ((newGC.getTabLevel() > oldGC.getTabLevel()+1) + || (newGC.getTabLevel() > oldGC.getTabLevel() && oldGC.getMTab().getRecord_ID() <=0)) // TabLevel increase and parent ID <=0 IDEMPIERE 382 { // validate // Search for right tab GridController rightGC = null; - boolean canJump = true; + //boolean canJump = true; + boolean canJump = oldGC.getMTab().getRecord_ID() <=0 ? false : true; // IDEMPIERE 382 int currentLevel = newGC.getTabLevel(); for (int i = index-1; i >=0; i--) {