From 5218e2f710c53221ae8fb580effa05cb2fbebd54 Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Thu, 19 Mar 2015 00:55:50 +0100 Subject: [PATCH] Fix for filter fix for #749 + You can now search for sets using lower case: "frf", "dtk", "rtr" and so on. + You now need exact matches on set short and full names. "rtr" and "return to ravnica" will work. "return" will not work. --- cockatrice/src/filtertree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/filtertree.cpp b/cockatrice/src/filtertree.cpp index b1996929..ef843d7b 100644 --- a/cockatrice/src/filtertree.cpp +++ b/cockatrice/src/filtertree.cpp @@ -202,8 +202,8 @@ bool FilterItem::acceptSet(const CardInfo *info) const status = false; for (i = info->getSets().constBegin(); i != info->getSets().constEnd(); i++) - if ((*i)->getShortName() == term - || (*i)->getLongName().contains(term, Qt::CaseInsensitive)) { + if ((*i)->getShortName().compare(term, Qt::CaseInsensitive) == 0 + || (*i)->getLongName().compare(term, Qt::CaseInsensitive) == 0) { status = true; break; }