IDEMPIERE-4514 Grid View Layout Bug (#336)
Fix issue with first time switching of detail tab.
This commit is contained in:
parent
d2a2e3d19f
commit
904c8131be
|
@ -917,14 +917,14 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
&& currentRow < tabPanel.getGridTab().getRowCount()) {
|
||||
tabPanel.getGridTab().setCurrentRow(currentRow, false);
|
||||
}
|
||||
Center center = findCenter(tabPanel.getGridView());
|
||||
if (center != null)
|
||||
center.invalidate();
|
||||
else
|
||||
tabPanel.invalidate();
|
||||
}
|
||||
if (!tabPanel.isVisible()) {
|
||||
tabPanel.setVisible(true);
|
||||
Executions.schedule(tabPanel.getDesktop(), e -> {
|
||||
invalidateTabPanel(tabPanel);
|
||||
}, new Event("onPostActivateDetail", tabPanel));
|
||||
} else {
|
||||
invalidateTabPanel(tabPanel);
|
||||
}
|
||||
boolean wasForm = false;
|
||||
if (!tabPanel.isGridView()) {
|
||||
|
@ -947,6 +947,14 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
tabPanel.switchRowPresentation();
|
||||
}
|
||||
|
||||
private void invalidateTabPanel(IADTabpanel tabPanel) {
|
||||
Center center = findCenter(tabPanel.getGridView());
|
||||
if (center != null)
|
||||
center.invalidate();
|
||||
else
|
||||
tabPanel.invalidate();
|
||||
}
|
||||
|
||||
private Center findCenter(GridView gridView) {
|
||||
if (gridView == null)
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue