mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 23:12:14 -07:00
add function to sort hand by type and name
This commit is contained in:
parent
8ea4490441
commit
eb3ae97ac1
2 changed files with 10 additions and 0 deletions
|
|
@ -127,6 +127,15 @@ void HandZone::reorganizeCards()
|
|||
update();
|
||||
}
|
||||
|
||||
void HandZone::sortHand()
|
||||
{
|
||||
if (cards.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
cards.sortBy({CardList::SortByType, CardList::SortByName});
|
||||
reorganizeCards();
|
||||
}
|
||||
|
||||
void HandZone::setWidth(qreal _width)
|
||||
{
|
||||
if (SettingsCache::instance().getHorizontalHand()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue