Select entry above deleted entry

* Fix #6304 - Don't cause the list view to scroll to the top when deleting any entry in the list.
This commit is contained in:
hollow-owl 2021-08-17 00:00:41 -05:00 committed by Jonathan White
parent 746276edea
commit af9eb6d6b1
3 changed files with 24 additions and 3 deletions

View file

@ -289,6 +289,11 @@ Entry* EntryView::entryFromIndex(const QModelIndex& index)
}
}
QModelIndex EntryView::indexFromEntry(Entry* entry)
{
return m_sortModel->mapFromSource(m_model->indexFromEntry(entry));
}
int EntryView::currentEntryIndex()
{
QModelIndexList list = selectionModel()->selectedRows();