mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix removing entry from history and improve logic of history tab showing
This commit is contained in:
parent
99e42b1fce
commit
067deb9bd7
@ -1151,6 +1151,7 @@ bool EditEntryWidget::commitEntry()
|
||||
}
|
||||
|
||||
m_historyModel->setEntries(m_entry->historyItems(), m_entry);
|
||||
setPageHidden(m_historyWidget, m_history || m_entry->historyItems().count() < 1);
|
||||
m_advancedUi->attachmentsWidget->linkAttachments(m_entry->attachments());
|
||||
|
||||
showMessage(tr("Entry updated successfully."), MessageWidget::Positive);
|
||||
|
@ -158,9 +158,10 @@ void EntryHistoryModel::deleteIndex(QModelIndex index)
|
||||
{
|
||||
auto entry = entryFromIndex(index);
|
||||
if (entry) {
|
||||
beginRemoveRows(QModelIndex(), m_historyEntries.indexOf(entry), m_historyEntries.indexOf(entry));
|
||||
beginRemoveRows(QModelIndex(), index.row(), index.row());
|
||||
m_historyEntries.removeAll(entry);
|
||||
m_deletedHistoryEntries << entry;
|
||||
m_historyModifications.erase(m_historyModifications.begin() + index.row());
|
||||
endRemoveRows();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user