mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-22 14:53:53 -07:00
feat: set prioritization by set type (#5097)
* feat: prefer 'Core' and 'Expansion' sets for prioritization * rework set prioritization * clean up priority enum * formatting * revert changes to CockatriceXml3Parser * re-add missing null check * remove priority fallback ternary from CardSet model * make defaultSort logic easier to follow * revert changes to v3 card database xsd * remove unused invisible priority col from sets dialog * move draft innovation and duel deck sets to secondary prio * minor fixes * change PriorityFallback to 1 * make priority optional in xml * remove PriorityUndefined and set PriorityFallback to 0 * set priority when not found to PriorityOther in case a new set type is added it's unlikey we want it sorted first, it'll probably be a new product so it's probably best to sort it with the funny things * simplify sort function --------- Co-authored-by: tooomm <tooomm@users.noreply.github.com> Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
parent
5156495b47
commit
b9ed9a6c0b
11 changed files with 128 additions and 36 deletions
|
|
@ -102,6 +102,7 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent)
|
|||
view->sortByColumn(SetsModel::SortKeyCol, Qt::AscendingOrder);
|
||||
view->setColumnHidden(SetsModel::SortKeyCol, true);
|
||||
view->setColumnHidden(SetsModel::IsKnownCol, true);
|
||||
view->setColumnHidden(SetsModel::PriorityCol, true);
|
||||
view->setRootIsDecorated(false);
|
||||
|
||||
connect(view->header(), SIGNAL(sectionClicked(int)), this, SLOT(actSort(int)));
|
||||
|
|
@ -254,7 +255,7 @@ void WndSets::actRestore()
|
|||
void WndSets::actRestoreOriginalOrder()
|
||||
{
|
||||
view->header()->setSortIndicator(SORT_RESET, Qt::DescendingOrder);
|
||||
model->sort(model->ReleaseDateCol, Qt::DescendingOrder);
|
||||
model->restoreOriginalOrder();
|
||||
sortWarning->setVisible(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue