mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-02 17:44:46 -05:00
Fix removing entry from history and improve logic of history tab showing
This commit is contained in:
parent
6b3eaa7f3e
commit
7bfe9065cf
@ -1190,6 +1190,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…
x
Reference in New Issue
Block a user