Consider text and name in a special way.

Took 11 minutes
This commit is contained in:
Lukas Brübach 2025-12-12 03:14:24 +01:00
parent cbd485f13d
commit ecd3c7b269

View file

@ -5,7 +5,14 @@
bool cardMatchesCondition(const CardInfo &card, const CardCondition &cond)
{
CardMatchType type = matchTypeFromString(cond.matchType);
QString fieldValue = card.getProperty(cond.field);
QString fieldValue;
if (cond.field == "name") {
fieldValue = card.getName();
} else if (cond.field == "text") {
fieldValue = card.getText();
} else {
fieldValue = card.getProperty(cond.field);
}
switch (type) {
case CardMatchType::Equals: