FIX Editions in Checkboxlist sorted (latest to earliest)

This commit is contained in:
leriomaggio
2021-05-31 11:19:08 +01:00
parent 01e51ecb73
commit 8a1770ffda

View File

@@ -50,8 +50,15 @@ public class DialogChooseSets {
// create a local copy of the editions list so we can sort it // create a local copy of the editions list so we can sort it
List<CardEdition> editions = Lists.newArrayList(FModel.getMagicDb().getEditions()); List<CardEdition> editions = Lists.newArrayList(FModel.getMagicDb().getEditions());
Collections.sort(editions);
Collections.reverse(editions);
List<CardEdition> customEditions = Lists.newArrayList(FModel.getMagicDb().getCustomEditions()); List<CardEdition> customEditions = Lists.newArrayList(FModel.getMagicDb().getCustomEditions());
boolean customSetsExist = (customEditions.size() > 0); boolean customSetsExist = (customEditions.size() > 0);
if (customSetsExist){
Collections.sort(customEditions);
Collections.reverse(customEditions);
}
List<FCheckBox> coreSets = new ArrayList<>(); List<FCheckBox> coreSets = new ArrayList<>();
List<FCheckBox> expansionSets = new ArrayList<>(); List<FCheckBox> expansionSets = new ArrayList<>();
List<FCheckBox> otherSets = new ArrayList<>(); List<FCheckBox> otherSets = new ArrayList<>();