group printings together when sorting in card reveal window (#5476)

This commit is contained in:
RickyRister 2025-01-15 05:14:47 -08:00 committed by GitHub
parent 455d68f9ea
commit 3a740f0bde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View file

@ -146,6 +146,8 @@ std::function<QString(CardItem *)> CardList::getExtractorFor(SortOption option)
return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getPowTough().rightJustified(10, '0') : ""; };
case SortBySet:
return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getSetsNames() : ""; };
case SortByPrinting:
return [](CardItem *c) { return c->getProviderId(); };
}
// this line should never be reached

View file

@ -28,7 +28,8 @@ public:
SortByManaCost,
SortByColors,
SortByPt,
SortBySet
SortBySet,
SortByPrinting
};
CardList(bool _contentsKnown);
CardItem *findCard(const int cardId) const;

View file

@ -164,6 +164,9 @@ void ZoneViewZone::reorganizeCards()
if (sortBy != CardList::SortByName) {
sortOptions << CardList::SortByName;
}
// group printings together
sortOptions << CardList::SortByPrinting;
}
cardsToDisplay.sortBy(sortOptions);