mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
group printings together when sorting in card reveal window (#5476)
This commit is contained in:
parent
455d68f9ea
commit
3a740f0bde
3 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ public:
|
|||
SortByManaCost,
|
||||
SortByColors,
|
||||
SortByPt,
|
||||
SortBySet
|
||||
SortBySet,
|
||||
SortByPrinting
|
||||
};
|
||||
CardList(bool _contentsKnown);
|
||||
CardItem *findCard(const int cardId) const;
|
||||
|
|
|
|||
|
|
@ -164,6 +164,9 @@ void ZoneViewZone::reorganizeCards()
|
|||
if (sortBy != CardList::SortByName) {
|
||||
sortOptions << CardList::SortByName;
|
||||
}
|
||||
|
||||
// group printings together
|
||||
sortOptions << CardList::SortByPrinting;
|
||||
}
|
||||
|
||||
cardsToDisplay.sortBy(sortOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue