mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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) {
|
public void setup(ItemManagerConfig config0, Map<ColumnDef, ItemColumn> colOverrides) {
|
||||||
this.config = config0;
|
this.config = config0;
|
||||||
|
this.setWantUnique(config0.getUniqueCardsOnly());
|
||||||
for (ItemView<T> view : this.views) {
|
for (ItemView<T> view : this.views) {
|
||||||
view.setup(config0, colOverrides);
|
view.setup(config0, colOverrides);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ public final class ItemListView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
if (itemManager.getWantUnique() == wantUnique) { return; }
|
if (itemManager.getWantUnique() == wantUnique) { return; }
|
||||||
itemManager.setWantUnique(wantUnique);
|
itemManager.setWantUnique(wantUnique);
|
||||||
itemManager.refresh();
|
itemManager.refresh();
|
||||||
|
|
||||||
|
if (itemManager.getConfig() != null) {
|
||||||
|
itemManager.getConfig().setUniqueCardsOnly(wantUnique);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getPnlOptions().add(chkBox);
|
getPnlOptions().add(chkBox);
|
||||||
|
|||||||
Reference in New Issue
Block a user