Merge branch 'raceboardmodes'

This commit is contained in:
Axel Uhl committed 2016-07-20 14:43:58 +02:00
commit 6a807cff29
1 file changed
+14 -9
@@ -166,16 +166,21 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
setExpanded(!isExpanded());
ensureExpansionDataIsLoaded(new Runnable() {
public void run() {
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted asynchronously
// while toggling the columns.
if (insertIndex != -1) {
insertIndex++;
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
column.updateMinMax();
getLeaderboardPanel().insertColumn(insertIndex++, column);
// column may have been collapsed meanwhile, so that the columns must not be added to the table right now
if (isExpanded()) {
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted
// asynchronously while toggling the columns.
if (insertIndex != -1) {
insertIndex++;
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
column.updateMinMax();
if (table.getColumnIndex(column) < 0) {
getLeaderboardPanel().insertColumn(insertIndex++, column);
}
}
getLeaderboardPanel().getLeaderboardTable().redraw();
}
getLeaderboardPanel().getLeaderboardTable().redraw();
}
getLeaderboardPanel().setBusyState(oldBusyState);
setTogglingInProcess(false);