diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 25198d1235..52e2c75d2e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -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; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index cd733dfd6d..5c7e4c05ca 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -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"); @@ -904,7 +906,9 @@ public class CompositeADTabbox extends AbstractADTabbox Row row = gtr.getCurrentRow(); 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() {