Commit 0589f02c authored by Matt Lowe's avatar Matt Lowe
Browse files

Partial Card Name Search

+ Card searches now do partial string matches, rather than needing to
match the beginning of the string.
parent 8f801825
...@@ -365,7 +365,7 @@ void TabDeckEditor::updateCardInfoRight(const QModelIndex &current, const QModel ...@@ -365,7 +365,7 @@ void TabDeckEditor::updateCardInfoRight(const QModelIndex &current, const QModel
void TabDeckEditor::updateSearch(const QString &search) void TabDeckEditor::updateSearch(const QString &search)
{ {
databaseDisplayModel->setCardNameBeginning(search); databaseDisplayModel->setCardName(search);
QModelIndexList sel = databaseView->selectionModel()->selectedRows(); QModelIndexList sel = databaseView->selectionModel()->selectedRows();
if (sel.isEmpty() && databaseDisplayModel->rowCount()) if (sel.isEmpty() && databaseDisplayModel->rowCount())
databaseView->selectionModel()->setCurrentIndex(databaseDisplayModel->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); databaseView->selectionModel()->setCurrentIndex(databaseDisplayModel->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment