From 778ad8dee1e23d513dc341d1bde972b8fdf2948a Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Tue, 14 Apr 2015 23:30:29 +0200 Subject: [PATCH] Simple name searching on by default Previously would try to match the card name, if nothing is found, then we would try again with the simple name. I have now made it only the simple name version. We do not need to perform the first check. Should help a little with performance. --- cockatrice/src/carddatabasemodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/carddatabasemodel.cpp b/cockatrice/src/carddatabasemodel.cpp index 2c6d658b..a0dff834 100644 --- a/cockatrice/src/carddatabasemodel.cpp +++ b/cockatrice/src/carddatabasemodel.cpp @@ -152,9 +152,8 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex return false; if (!cardName.isEmpty()) - if (!info->getName().contains(cardName, Qt::CaseInsensitive)) - if (!CardInfo::simplifyName(info->getName()).contains(cardName, Qt::CaseInsensitive)) - return false; + if (!CardInfo::simplifyName(info->getName()).contains(cardName, Qt::CaseInsensitive)) + return false; if (!cardNameSet.isEmpty()) if (!cardNameSet.contains(info->getName()))