Fix first entry is not selected when a search is performed (#9868)

This commit is contained in:
Colfenor 2023-09-25 15:21:28 +02:00 committed by GitHub
parent 6b67f587e5
commit cd7a53abbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -219,11 +219,12 @@ void EntryView::displaySearch(const QList<Entry*>& entries)
m_model->setEntries(entries);
header()->showSection(EntryModel::ParentGroup);
setFirstEntryActive();
// Reset sort column to 'Group', overrides DatabaseWidgetStateSync
m_sortModel->sort(EntryModel::ParentGroup, Qt::AscendingOrder);
sortByColumn(EntryModel::ParentGroup, Qt::AscendingOrder);
setFirstEntryActive();
m_inSearchMode = true;
}