Select new entry after cloning

Also fixes re-selecting entries during a search refresh
This commit is contained in:
Akinori MUSHA authored and Jonathan White committed 2023-02-13 23:22:13 -08:00
1 parent b4be71d967
commit cc35bf2096
7 files changed
+59 -41

No files matched your search

+4 -2
View File
@@ -50,8 +50,10 @@ Entry* EntryModel::entryFromIndex(const QModelIndex& index) const
QModelIndex EntryModel::indexFromEntry(Entry* entry) const
{
int row = m_entries.indexOf(entry);
Q_ASSERT(row != -1);
return index(row, 1);
if (row >= 0) {
return index(row, 1);
}
return {};
}
void EntryModel::setGroup(Group* group)