GroupTable columns are misaligned in case of aggregatable table #684

This commit is contained in:
Daniil Tsarev 2018-08-16 13:52:30 +04:00
parent 8dfa69ca97
commit 2fb1a60cbf

View File

@ -147,8 +147,18 @@ public class TableWidgetDelegate {
if (tableWidget.getRenderedRows().isEmpty() &&
aggregationRow != null && aggregationRow.isInitialized()) {
double realColWidth = aggregationRow.getRealCellWidth(colIndex);
if (realColWidth > 0) {
updateHeaderCellWidth(hCell, minWidth, realColWidth);
if (!Double.isNaN(realColWidth)) {
if (realColWidth > 0) {
updateHeaderCellWidth(hCell, minWidth, realColWidth);
}
} else {
// schedule reassigning in case of empty table grouping due to aggregation row is not displayed yet
Scheduler.get().scheduleDeferred(() -> {
double rcw = aggregationRow.getRealCellWidth(colIndex);
if (rcw > 0) {
updateHeaderCellWidth(hCell, minWidth, rcw);
}
});
}
}
}