IDEMPIERE-4514 Grid View Layout Bug (#348)

This commit is contained in:
hengsin 2020-11-03 20:58:54 +08:00 committed by GitHub
parent f43883f795
commit d046842ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 8 deletions

View File

@ -1367,6 +1367,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
if (tabPanel != null) {
if (!tabPanel.isActivated()) {
tabPanel.activate(true);
} else {
tabPanel.getGridView().invalidateGridView();
}
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
@ -1568,7 +1570,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
listPanel.dynamicDisplay(col);
if (GridTable.DATA_REFRESH_MESSAGE.equals(e.getAD_Message()) ||
"Sorted".equals(e.getAD_Message())) {
listPanel.getListbox().invalidate();
listPanel.invalidateGridView();
}
}
}

View File

@ -493,8 +493,9 @@ public class CompositeADTabbox extends AbstractADTabbox
}
hasChanges = true;
}
if (hasChanges)
headerTab.getDetailPane().invalidate();
if (hasChanges) {
headerTab.getDetailPane().getParent().invalidate();
}
}
}

View File

@ -799,11 +799,7 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
listModel.setPage(pgNo);
onSelectedRowChange(0);
gridTab.clearSelection();
Center center = findCenter(this);
if (center != null)
center.invalidate();
else
this.invalidate();
invalidateGridView();
}
}
else if (event.getTarget() == selectAll)
@ -1220,6 +1216,13 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
refresh(gridTab);
scrollToCurrentRow();
invalidateGridView();
}
/**
* redraw grid view
*/
public void invalidateGridView() {
Center center = findCenter(this);
if (center != null)
center.invalidate();