IDEMPIERE-2700 Zoom to detail is not honoring the configuration of tab grid/form

This commit is contained in:
Carlos Ruiz 2015-06-26 09:24:27 -05:00
parent 35f0b830a0
commit 2183eb44ef
2 changed files with 6 additions and 4 deletions

View File

@ -527,8 +527,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
setActiveTab(gridWindow.getTabIndex(gTab), null);
gTab.navigate(i);
if (gc.isGridView())
gc.switchRowPresentation();
return true;
}
}

View File

@ -890,8 +890,10 @@ public class CompositeADTabbox extends AbstractADTabbox
if (!tabPanel.isVisible()) {
tabPanel.setVisible(true);
}
boolean wasForm = false;
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
tabPanel.switchRowPresentation(); // required to avoid NPE on GridTabRowRenderer.getCurrentRow below
wasForm = true;
}
tabPanel.setDetailPaneMode(true);
headerTab.getDetailPane().setVflex("true");
@ -905,6 +907,8 @@ public class CompositeADTabbox extends AbstractADTabbox
if (row != null)
gtr.setCurrentRow(row);
}
if (wasForm && tabPanel.getTabLevel() == 0 && headerTab.getTabLevel() != 0) // maintain form on header when zooming to a detail tab
tabPanel.switchRowPresentation();
}
private void showLastError() {