[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:
RickyRister 2025-12-31 03:01:49 -08:00 committed by GitHub
parent 968be8a06f
commit d722b2569c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 66 additions and 59 deletions

View file

@ -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());
}