mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 03:53:56 -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') : ""; };
|
return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getPowTough().rightJustified(10, '0') : ""; };
|
||||||
case SortBySet:
|
case SortBySet:
|
||||||
return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getSetsNames() : ""; };
|
return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getSetsNames() : ""; };
|
||||||
|
case SortByPrinting:
|
||||||
|
return [](CardItem *c) { return c->getProviderId(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
// this line should never be reached
|
// this line should never be reached
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ public:
|
||||||
SortByManaCost,
|
SortByManaCost,
|
||||||
SortByColors,
|
SortByColors,
|
||||||
SortByPt,
|
SortByPt,
|
||||||
SortBySet
|
SortBySet,
|
||||||
|
SortByPrinting
|
||||||
};
|
};
|
||||||
CardList(bool _contentsKnown);
|
CardList(bool _contentsKnown);
|
||||||
CardItem *findCard(const int cardId) const;
|
CardItem *findCard(const int cardId) const;
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,9 @@ void ZoneViewZone::reorganizeCards()
|
||||||
if (sortBy != CardList::SortByName) {
|
if (sortBy != CardList::SortByName) {
|
||||||
sortOptions << CardList::SortByName;
|
sortOptions << CardList::SortByName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// group printings together
|
||||||
|
sortOptions << CardList::SortByPrinting;
|
||||||
}
|
}
|
||||||
|
|
||||||
cardsToDisplay.sortBy(sortOptions);
|
cardsToDisplay.sortBy(sortOptions);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue