mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix so adding cards to sideboard in Quest Deck Editor properly removes them from inventory
This commit is contained in:
@@ -120,20 +120,20 @@ public final class CEditorConstructed extends ACEditorBase<PaperCard, Deck> {
|
|||||||
controller.getModel().getOrCreate(DeckSection.Sideboard).addAll(itemsToAdd);
|
controller.getModel().getOrCreate(DeckSection.Sideboard).addAll(itemsToAdd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break; //no other sections should support toAlternate
|
return; //no other sections should support toAlternate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
editor.getDeckManager().addItems(itemsToAdd);
|
editor.getDeckManager().addItems(itemsToAdd);
|
||||||
|
}
|
||||||
|
|
||||||
if (editor.getCatalogManager().isInfinite()) {
|
if (editor.getCatalogManager().isInfinite()) {
|
||||||
//select all added cards in Catalog if infinite
|
//select all added cards in Catalog if infinite
|
||||||
editor.getCatalogManager().selectItemEntrys(itemsToAdd);
|
editor.getCatalogManager().selectItemEntrys(itemsToAdd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//remove all added cards from Catalog if not infinite
|
//remove all added cards from Catalog if not infinite
|
||||||
editor.getCatalogManager().removeItems(items);
|
editor.getCatalogManager().removeItems(items);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
controller.notifyModelChanged();
|
controller.notifyModelChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user