Make single set selection show only that set

Show multiple set selection in chron order in combo box
This commit is contained in:
drdev
2014-07-25 04:32:59 +00:00
parent 13d766f706
commit 154b50cebd

View File

@@ -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);