Merge branch 'deck-editor-unique-filter' into 'master'

Deck editor filters bug

See merge request core-developers/forge!2214
This commit is contained in:
swordshine
2019-10-07 03:45:17 +00:00
2 changed files with 9 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ public class FScreen {
public static final FScreen HOME_SCREEN = new FScreen(
VHomeUI.SINGLETON_INSTANCE,
CHomeUI.SINGLETON_INSTANCE,
"Home",
"Home ",
FSkin.getIcon(FSkinProp.ICO_FAVICON),
false,
"Exit Forge",
@@ -46,7 +46,7 @@ public class FScreen {
public static final FScreen DECK_EDITOR_CONSTRUCTED = new FScreen(
VDeckEditorUI.SINGLETON_INSTANCE,
CDeckEditorUI.SINGLETON_INSTANCE,
"Deck Editor",
"Deck Editor ",
FSkin.getImage(FSkinProp.IMG_PACK),
false,
"Back to Home",

View File

@@ -77,6 +77,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
private Point hoverScrollPos;
private ItemInfo hoveredItem;
private ItemInfo focalItem;
private boolean panelOptionsCreated = false;
private final List<ItemInfo> orderedItems = new ArrayList<>();
private final List<Group> groups = new ArrayList<>();
@@ -337,7 +338,12 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
@Override
public void setup(ItemManagerConfig config, Map<ColumnDef, ItemTableColumn> colOverrides) {
// if this is the first setup call, panel options will be added to UI components
if (!this.panelOptionsCreated){
setPanelOptions(config.getShowUniqueCardsOption());
this.panelOptionsCreated = true;
}
// set status of components in the panel
setGroupBy(config.getGroupBy(), true);
setPileBy(config.getPileBy(), true);
setColumnCount(config.getImageColumnCount(), true);