mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Don't have decklist sort behavior rely on column order
This commit is contained in:
parent
e99c1bbe6d
commit
68c0932a2f
3 changed files with 26 additions and 13 deletions
|
|
@ -104,7 +104,7 @@ QString InnerDecklistNode::visibleNameFromName(const QString &_name)
|
|||
return _name;
|
||||
}
|
||||
|
||||
void InnerDecklistNode::setSortMethod(int method)
|
||||
void InnerDecklistNode::setSortMethod(DeckSortMethod method)
|
||||
{
|
||||
sortMethod = method;
|
||||
for (int i = 0; i < size(); i++)
|
||||
|
|
@ -218,11 +218,11 @@ bool InnerDecklistNode::comparePrice(AbstractDecklistNode *other) const
|
|||
bool AbstractDecklistCardNode::compare(AbstractDecklistNode *other) const
|
||||
{
|
||||
switch (sortMethod) {
|
||||
case 0:
|
||||
case ByNumber:
|
||||
return compareNumber(other);
|
||||
case 1:
|
||||
case ByName:
|
||||
return compareName(other);
|
||||
case 2:
|
||||
case ByPrice:
|
||||
return compareTotalPrice(other);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue