mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-12 21:44:18 -07:00
Move defaultOptions up a level
This commit is contained in:
parent
36e68d86be
commit
f5426b2236
2 changed files with 5 additions and 7 deletions
|
|
@ -161,12 +161,14 @@ static QList<CardList::SortOption> expandSortOption(CardList::SortOption option)
|
|||
|
||||
void PlayerActions::actSortHand()
|
||||
{
|
||||
auto *action = static_cast<QAction *>(sender());
|
||||
auto *action = qobject_cast<QAction *>(sender());
|
||||
CardList::SortOption option = static_cast<CardList::SortOption>(action->data().toInt());
|
||||
|
||||
QList<CardList::SortOption> sortOptions = expandSortOption(option);
|
||||
|
||||
player->getGraphicsItem()->getHandZoneGraphicsItem()->sortHand(sortOptions);
|
||||
static QList defaultOptions = {CardList::SortByName, CardList::SortByPrinting};
|
||||
|
||||
player->getGraphicsItem()->getHandZoneGraphicsItem()->sortHand(sortOptions + defaultOptions);
|
||||
}
|
||||
|
||||
void PlayerActions::actViewTopCards()
|
||||
|
|
|
|||
|
|
@ -117,11 +117,7 @@ void HandZone::sortHand(const QList<CardList::SortOption> &options)
|
|||
return;
|
||||
}
|
||||
|
||||
// Implicitly sort by name at the end so that cards with the same name appear together.
|
||||
// Also group printings together
|
||||
static QList defaultOptions = {CardList::SortByName, CardList::SortByPrinting};
|
||||
|
||||
getLogic()->sortCards(options + defaultOptions);
|
||||
getLogic()->sortCards(options);
|
||||
reorganizeCards();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue