mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 17:43:23 -08:00
[UI] Auto-select first completion match in popup
This commit is contained in:
parent
4607b7d3ad
commit
ae0dfb8622
2 changed files with 3 additions and 4 deletions
|
|
@ -176,11 +176,11 @@ void CardCompleterStyler::ensureClosestSelected()
|
|||
}
|
||||
|
||||
const int currentRow = popup->currentIndex().row();
|
||||
const int closestRow = rowCount - 1;
|
||||
const int closestRow = 0;
|
||||
|
||||
if (currentRow != closestRow) {
|
||||
popup->selectionModel()->setCurrentIndex(completionModel->index(closestRow, completer->completionColumn()),
|
||||
QItemSelectionModel::NoUpdate);
|
||||
QItemSelectionModel::SelectCurrent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue