mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix so Unique Cards Only option saved between sessions
This commit is contained in:
@@ -299,6 +299,7 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
||||
}
|
||||
public void setup(ItemManagerConfig config0, Map<ColumnDef, ItemColumn> colOverrides) {
|
||||
this.config = config0;
|
||||
this.setWantUnique(config0.getUniqueCardsOnly());
|
||||
for (ItemView<T> view : this.views) {
|
||||
view.setup(config0, colOverrides);
|
||||
}
|
||||
|
||||
@@ -145,6 +145,10 @@ public final class ItemListView<T extends InventoryItem> extends ItemView<T> {
|
||||
if (itemManager.getWantUnique() == wantUnique) { return; }
|
||||
itemManager.setWantUnique(wantUnique);
|
||||
itemManager.refresh();
|
||||
|
||||
if (itemManager.getConfig() != null) {
|
||||
itemManager.getConfig().setUniqueCardsOnly(wantUnique);
|
||||
}
|
||||
}
|
||||
});
|
||||
getPnlOptions().add(chkBox);
|
||||
|
||||
Reference in New Issue
Block a user