mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
fix for bug 3037: use int[0] to encode no discards on regatta; make regatta leaderboard dialog robust for null discarding threshold array
This commit is contained in:
1 parent
ffa6b1f6ca
commit
dbdcdfebb0
3 files changed
+5
-3
No files matched your search
+3
-1
@@ -74,7 +74,9 @@ public abstract class RegattaLeaderboardDialog extends AbstractLeaderboardDialog
|
||||
}
|
||||
regattaDefinesDiscardsLabel.setVisible(true);
|
||||
} else {
|
||||
discardThresholdBoxes.getWidget().setVisible(true);
|
||||
if (discardThresholdBoxes != null) {
|
||||
discardThresholdBoxes.getWidget().setVisible(true);
|
||||
}
|
||||
regattaDefinesDiscardsLabel.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class RegattaLeaderboardEditDialog extends RegattaLeaderboardDialog {
|
||||
|
||||
regattaListBox = createSortedRegattaListBox(existingRegattas, leaderboardDescriptor.getRegattaName());
|
||||
regattaListBox.setEnabled(false);
|
||||
if (leaderboardDescriptor.getDiscardThresholds() != null) {
|
||||
if (!getSelectedRegatta().definesSeriesDiscardThresholds()) {
|
||||
discardThresholdBoxes = new DiscardThresholdBoxes(this, leaderboardDescriptor.getDiscardThresholds(), stringMessages);
|
||||
} // else, the regatta leaderboard obtains its result discarding rule implicitly from the underlying regatta
|
||||
adjustVisibilityOfResultDiscardingRuleComponent();
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ public class SeriesEditDialog extends DataEntryDialog<SeriesDescriptor> {
|
||||
}
|
||||
return new SeriesDescriptor(selectedSeries, seriesNameTextBox.getValue(), races, isMedalCheckbox.getValue(),
|
||||
useSeriesResultDiscardingThresholdsCheckbox.getValue() ? discardThresholdBoxes.getDiscardThresholds()
|
||||
: null, startWithZeroScoreCheckbox.getValue(),
|
||||
: new int[0], startWithZeroScoreCheckbox.getValue(),
|
||||
firstColumnIsNonDiscardableCarryForwardCheckbox.getValue(), hasSplitFleetContiguousScoringCheckbox.getValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user