change some size() comparisons, to isEmpty()

This commit is contained in:
Ingmar Goudt 2019-07-14 20:53:23 +02:00
parent 5ba206111a
commit eb0cfc94f8
23 changed files with 35 additions and 36 deletions

View file

@ -198,7 +198,7 @@ public class RandomPacksSelectorDialog extends javax.swing.JDialog {
public void doApply() {
if (getSelectedPacks().size() < 2 && isRandomDraft) {
JOptionPane.showMessageDialog(this, "At least 2 sets must be selected", "Error", JOptionPane.ERROR_MESSAGE);
} else if (getSelectedPacks().size() < 1 && isRichManDraft) {
} else if (getSelectedPacks().isEmpty() && isRichManDraft) {
JOptionPane.showMessageDialog(this, "At least 1 set must be selected", "Error", JOptionPane.ERROR_MESSAGE);
} else {
this.setVisible(false);