Commit 58ace2fa authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

deck editor autoselection

parent d0fa9d92
......@@ -268,6 +268,9 @@ void WndDeckEditor::updateCardInfoRight(const QModelIndex &current, const QModel
void WndDeckEditor::updateSearch(const QString &search)
{
databaseDisplayModel->setCardNameBeginning(search);
QModelIndexList sel = databaseView->selectionModel()->selectedRows();
if (sel.isEmpty() && databaseDisplayModel->rowCount())
databaseView->selectionModel()->setCurrentIndex(databaseDisplayModel->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
}
bool WndDeckEditor::confirmClose()
......
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