IDEMPIERE-1232 Zoom condition fixes / found problem obtaining parent tab on MZoomCondition as the variable _TabInfo_TabLevel has not been initialized - when navigating to BP Location it finds User BP Access as parent tab instead of the master BP
This commit is contained in:
parent
a9145e7061
commit
4ff74bfef3
|
@ -3163,13 +3163,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
int parentLevel = currentLevel-1;
|
||||
if (parentLevel < 0)
|
||||
return tabNo;
|
||||
while (parentLevel != currentLevel)
|
||||
{
|
||||
tabNo--;
|
||||
currentLevel = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, tabNo, GridTab.CTX_TabLevel);
|
||||
if (tabNo == 0)
|
||||
break;
|
||||
}
|
||||
while (parentLevel != currentLevel)
|
||||
{
|
||||
tabNo--;
|
||||
currentLevel = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, tabNo, GridTab.CTX_TabLevel);
|
||||
if (tabNo == 0)
|
||||
break;
|
||||
}
|
||||
return tabNo;
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ public class GridWindow implements Serializable
|
|||
if (mTabVO != null)
|
||||
{
|
||||
GridTab mTab = new GridTab(mTabVO, this, m_virtual);
|
||||
Env.setContext(m_vo.ctx, m_vo.WindowNo, t, GridTab.CTX_TabLevel, Integer.toString(mTab.getTabLevel()));
|
||||
m_tabs.add(mTab);
|
||||
}
|
||||
} // for all tabs
|
||||
|
|
Loading…
Reference in New Issue