- Fixed a bug which made the Qty and New columns disappear when switching between Main and Sideboard in quest deck editor.

This commit is contained in:
Agetian
2018-12-20 08:51:17 +03:00
parent b792f13c70
commit c83a364e41

View File

@@ -392,16 +392,19 @@ public final class CEditorQuest extends CDeckEditor<Deck> {
//Fixes null pointer error on switching tabs while quest deck editor is open. TODO: Find source of bug possibly?
if(sectionMode == null) sectionMode = DeckSection.Main;
final Map<ColumnDef, ItemTableColumn> colOverridesCatalog = new HashMap<ColumnDef, ItemTableColumn>();
ItemTableColumn.addColOverride(ItemManagerConfig.QUEST_EDITOR_POOL, colOverridesCatalog, ColumnDef.NEW, this.questData.getCards().getFnNewCompare(), this.questData.getCards().getFnNewGet());
//Based on which section the editor is in, display the remaining card pool (or applicable card pool if in
//Commander) and the current section's cards
switch(sectionMode){
case Main :
this.getCatalogManager().setup(ItemManagerConfig.CARD_CATALOG);
this.getCatalogManager().setup(ItemManagerConfig.QUEST_EDITOR_POOL, colOverridesCatalog);
this.getCatalogManager().setPool(getRemainingCardPool());
this.getDeckManager().setPool(this.controller.getModel().getMain());
break;
case Sideboard :
this.getCatalogManager().setup(ItemManagerConfig.CARD_CATALOG);
this.getCatalogManager().setup(ItemManagerConfig.QUEST_EDITOR_POOL, colOverridesCatalog);
this.getCatalogManager().setPool(getRemainingCardPool());
this.getDeckManager().setPool(getDeck().getOrCreate(DeckSection.Sideboard));
break;