when empty display name is provided, reset to null

This commit is contained in:
Axel Uhl
2013-02-21 00:02:53 +01:00
parent 9b766230c1
commit 80e4f034d9
@@ -31,7 +31,7 @@ public abstract class AbstractLeaderboardDialog extends DataEntryDialog<Leaderbo
protected LeaderboardDescriptor getResult() {
int[] discardThresholdsBoxContents = getDiscardThresholds(discardThresholdBoxes);
leaderboard.setName(nameTextBox.getValue());
leaderboard.setDisplayName(displayNameTextBox.getValue());
leaderboard.setDisplayName(displayNameTextBox.getValue().trim().isEmpty() ? null : displayNameTextBox.getValue());
leaderboard.setDiscardThresholds(discardThresholdsBoxContents);
return leaderboard;
}