mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-09 05:40:57 +00:00
when leaderboard race column becomes tracked, fix columns during refresh
This commit is contained in:
1 parent
917a31bfaf
commit
95af5a3511
1 file changed
+10
+10
@@ -685,6 +685,16 @@ public class LeaderboardPanel extends FormPanel implements LegDetailSelectionPro
|
||||
RaceColumn<?> raceColumn = (RaceColumn<?>) c;
|
||||
if (raceColumn.getRaceName().equals(raceNameAndMedalRaceAndTracked.getKey())) {
|
||||
foundRaceColumn = true;
|
||||
// if tracked-ness differs, column must be updated with e new column
|
||||
// that is expansion-enabled
|
||||
if (raceColumn.isExpansionEnabled() != raceNameAndMedalRaceAndTracked.getValue().getB()) {
|
||||
if (raceColumn.isExpanded()) {
|
||||
raceColumn.toggleExpansion(); // remove children from table
|
||||
}
|
||||
int columnIndex = getLeaderboardTable().getColumnIndex(raceColumn);
|
||||
removeColumn(columnIndex);
|
||||
insertColumn(columnIndex, createRaceColumn(raceNameAndMedalRaceAndTracked));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user