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; }