mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
ensure correct card detail is shown in constructed deck editor when adding a card and not in sideboard mode
This commit is contained in:
@@ -122,8 +122,7 @@ public final class CEditorConstructed extends ACEditorBase<CardPrinted, Deck> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sectionMode == DeckSection.Avatar || sectionMode == DeckSection.Commander) {
|
if (sectionMode == DeckSection.Avatar || sectionMode == DeckSection.Commander) {
|
||||||
for(Map.Entry<CardPrinted, Integer> cp : getTableDeck().getCards())
|
for(Map.Entry<CardPrinted, Integer> cp : getTableDeck().getCards()) {
|
||||||
{
|
|
||||||
getTableDeck().removeCard(cp.getKey(), cp.getValue());
|
getTableDeck().removeCard(cp.getKey(), cp.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,9 +135,8 @@ public final class CEditorConstructed extends ACEditorBase<CardPrinted, Deck> {
|
|||||||
} else {
|
} else {
|
||||||
getTableDeck().addCard(card, qty);
|
getTableDeck().addCard(card, qty);
|
||||||
}
|
}
|
||||||
if (sectionMode == DeckSection.Sideboard) {
|
// if not in sideboard mode, "remove" 0 cards in order to re-show the selected card
|
||||||
this.getTableCatalog().removeCard(card, qty);
|
this.getTableCatalog().removeCard(card, sectionMode == DeckSection.Sideboard ? qty : 0);
|
||||||
}
|
|
||||||
|
|
||||||
this.controller.notifyModelChanged();
|
this.controller.notifyModelChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user