IDEMPIERE 382 - Swing

This commit is contained in:
Nicolas Micoud 2012-09-20 13:55:22 +02:00
parent dcc0773920
commit 5c1d614ec9
1 changed files with 4 additions and 2 deletions

View File

@ -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--)
{