mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
Adding Set Code To Filtering Method
Updating Tab To Include Set Param
This commit is contained in:
parent
4f61da62e8
commit
2e1f5332db
4 changed files with 21 additions and 2 deletions
|
|
@ -144,6 +144,19 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex
|
|||
if (!cardTypes.contains(info->getMainCardType()))
|
||||
return false;
|
||||
|
||||
if (!cardSet.isEmpty()) {
|
||||
bool blnGood = false;
|
||||
for(int intLoop = 0; intLoop < info->getSets().count(); intLoop++) {
|
||||
if (info->getSets().at(intLoop)->getShortName() == cardSet) {
|
||||
blnGood = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!blnGood) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue