From df55f2e0cfa72b716188216b1240ebaa0019466b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 25 Jan 2013 16:20:00 -0800 Subject: [PATCH] IDEMPIERE-369 Master Detail layout improvements / Found an infinite loop when a child tab is defined in level 2 and the parent tab is defined in level 0 --- org.adempiere.base/src/org/compiere/model/GridTab.java | 2 ++ org.adempiere.base/src/org/compiere/model/GridTable.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 9c0ccdba6b..d6de605fe6 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -3116,6 +3116,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { tabNo--; currentLevel = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, tabNo, GridTab.CTX_TabLevel); + if (tabNo == 0) + break; } return tabNo; } diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index b15d98d8ae..b1b557425c 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -3690,6 +3690,8 @@ public class GridTable extends AbstractTableModel { tabNo--; currentLevel = Env.getContextAsInt(m_ctx, m_WindowNo, tabNo, GridTab.CTX_TabLevel); + if (tabNo == 0) + break; } return tabNo; }