mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
[PrintingSelector] Remember card amount.
This commit is contained in:
parent
b52be14904
commit
ff5ef6c95d
1 changed files with 5 additions and 1 deletions
|
|
@ -156,10 +156,14 @@ void DlgSelectSetForCards::actOK()
|
||||||
if (!find_card.isValid()) {
|
if (!find_card.isValid()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
int amount =
|
||||||
|
model->data(find_card.siblingAtColumn(DeckListModelColumns::CARD_AMOUNT), Qt::DisplayRole).toInt();
|
||||||
model->removeRow(find_card.row(), find_card.parent());
|
model->removeRow(find_card.row(), find_card.parent());
|
||||||
CardInfoPtr cardInfo = CardDatabaseManager::query()->getCardInfo(card);
|
CardInfoPtr cardInfo = CardDatabaseManager::query()->getCardInfo(card);
|
||||||
PrintingInfo printing = CardDatabaseManager::query()->getSpecificPrinting(card, modifiedSet, "");
|
PrintingInfo printing = CardDatabaseManager::query()->getSpecificPrinting(card, modifiedSet, "");
|
||||||
model->addCard(ExactCard(cardInfo, printing), DECK_ZONE_MAIN);
|
for (int i = 0; i < amount; i++) {
|
||||||
|
model->addCard(ExactCard(cardInfo, printing), DECK_ZONE_MAIN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!modifiedSetsAndCardsMap.isEmpty()) {
|
if (!modifiedSetsAndCardsMap.isEmpty()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue