mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
[DeckListModel] Refactor: general code cleanup (#6460)
* change one usage * move method * move format check code * make group criteria method static * move method * make method private * more comments
This commit is contained in:
parent
968be8a06f
commit
d722b2569c
5 changed files with 66 additions and 59 deletions
|
|
@ -151,9 +151,7 @@ static QModelIndex addAndReplacePrintings(DeckListModel *model,
|
|||
|
||||
// Check if a card without a providerId already exists in the deckModel and replace it, if so.
|
||||
if (existing.isValid() && existing != newCardIndex && replaceProviderless) {
|
||||
for (int i = 0; i < extraCopies; i++) {
|
||||
model->addCard(rootCard, zone);
|
||||
}
|
||||
model->offsetCountAtIndex(newCardIndex, extraCopies);
|
||||
model->removeRow(existing.row(), existing.parent());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue