mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Make single set selection show only that set
Show multiple set selection in chron order in combo box
This commit is contained in:
@@ -173,12 +173,11 @@ public abstract class FormatFilter<T extends InventoryItem> extends ItemFilter<T
|
|||||||
List<String> setCodes = new ArrayList<String>();
|
List<String> setCodes = new ArrayList<String>();
|
||||||
List<CardEdition> sortedSets = new ArrayList<CardEdition>(selectedSets);
|
List<CardEdition> sortedSets = new ArrayList<CardEdition>(selectedSets);
|
||||||
Collections.sort(sortedSets);
|
Collections.sort(sortedSets);
|
||||||
Collections.reverse(sortedSets);
|
|
||||||
for (CardEdition set : sortedSets) {
|
for (CardEdition set : sortedSets) {
|
||||||
setCodes.add(set.getCode());
|
setCodes.add(set.getCode());
|
||||||
}
|
}
|
||||||
format = new GameFormat(null, setCodes, null);
|
format = new GameFormat(null, setCodes, null);
|
||||||
cbxFormats.setText(TextUtil.join(setCodes, ", "));
|
cbxFormats.setText(sortedSets.size() > 1 ? TextUtil.join(setCodes, ", ") : sortedSets.get(0).toString());
|
||||||
applyChange();
|
applyChange();
|
||||||
}
|
}
|
||||||
super.onClose(canCloseCallback);
|
super.onClose(canCloseCallback);
|
||||||
|
|||||||
Reference in New Issue
Block a user