Partial Card Name Search

+ Card searches now do partial string matches, rather than needing to
match the beginning of the string.
This commit is contained in:
Matt Lowe 2014-11-09 11:23:45 +01:00
parent 8f801825a9
commit 0589f02ca2

View file

@ -365,7 +365,7 @@ void TabDeckEditor::updateCardInfoRight(const QModelIndex &current, const QModel
void TabDeckEditor::updateSearch(const QString &search)
{
databaseDisplayModel->setCardNameBeginning(search);
databaseDisplayModel->setCardName(search);
QModelIndexList sel = databaseView->selectionModel()->selectedRows();
if (sel.isEmpty() && databaseDisplayModel->rowCount())
databaseView->selectionModel()->setCurrentIndex(databaseDisplayModel->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);