mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 01:23:57 -07:00
Start sets in include, correct subtype include/exact match logic.
Took 12 minutes
This commit is contained in:
parent
8b50a35129
commit
ab9d5734a0
2 changed files with 3 additions and 3 deletions
|
|
@ -60,7 +60,7 @@ private:
|
||||||
QMap<QString, QPushButton *> setButtons; // Store set filter buttons
|
QMap<QString, QPushButton *> setButtons; // Store set filter buttons
|
||||||
QMap<QString, bool> activeSets; // Track active set filters
|
QMap<QString, bool> activeSets; // Track active set filters
|
||||||
|
|
||||||
bool exactMatchMode = true; // Toggle between "Exact Match" and "Includes"
|
bool exactMatchMode = false; // Toggle between "Exact Match" and "Includes"
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VISUAL_DATABASE_DISPLAY_SET_FILTER_WIDGET_H
|
#endif // VISUAL_DATABASE_DISPLAY_SET_FILTER_WIDGET_H
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ void VisualDatabaseDisplaySubTypeFilterWidget::updateSubTypeFilter()
|
||||||
if (activeSubTypes[type]) {
|
if (activeSubTypes[type]) {
|
||||||
QString typeString = type;
|
QString typeString = type;
|
||||||
filterModel->addFilter(
|
filterModel->addFilter(
|
||||||
new CardFilter(typeString, CardFilter::Type::TypeAnd, CardFilter::Attr::AttrSubType));
|
new CardFilter(typeString, CardFilter::Type::TypeOr, CardFilter::Attr::AttrSubType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -201,7 +201,7 @@ void VisualDatabaseDisplaySubTypeFilterWidget::syncWithFilterModel()
|
||||||
// Get active filters for sub types
|
// Get active filters for sub types
|
||||||
QSet<QString> activeTypes;
|
QSet<QString> activeTypes;
|
||||||
for (const auto &filter : filterModel->getFiltersOfType(CardFilter::AttrSubType)) {
|
for (const auto &filter : filterModel->getFiltersOfType(CardFilter::AttrSubType)) {
|
||||||
if (filter->type() == CardFilter::Type::TypeAnd) {
|
if (filter->type() == CardFilter::Type::TypeAnd || filter->type() == CardFilter::Type::TypeOr) {
|
||||||
activeTypes.insert(filter->term());
|
activeTypes.insert(filter->term());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue