mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Clearing deleted entries on applying. (#814)
This commit is contained in:
parent
34886dc7e0
commit
6f9224784e
@ -429,6 +429,7 @@ void EditEntryWidget::saveEntry()
|
||||
// must stand before beginUpdate()
|
||||
// we don't want to create a new history item, if only the history has changed
|
||||
m_entry->removeHistoryItems(m_historyModel->deletedEntries());
|
||||
m_historyModel->clearDeletedEntries();
|
||||
|
||||
m_autoTypeAssoc->removeEmpty();
|
||||
|
||||
@ -912,8 +913,7 @@ void EditEntryWidget::deleteHistoryEntry()
|
||||
m_historyModel->deleteIndex(index);
|
||||
if (m_historyModel->rowCount() > 0) {
|
||||
m_historyUi->deleteAllButton->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_historyUi->deleteAllButton->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -115,6 +115,11 @@ void EntryHistoryModel::clear()
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void EntryHistoryModel::clearDeletedEntries()
|
||||
{
|
||||
m_deletedHistoryEntries.clear();
|
||||
}
|
||||
|
||||
QList<Entry*> EntryHistoryModel::deletedEntries()
|
||||
{
|
||||
return m_deletedHistoryEntries;
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
|
||||
void setEntries(const QList<Entry*>& entries);
|
||||
void clear();
|
||||
void clearDeletedEntries();
|
||||
QList<Entry*> deletedEntries();
|
||||
void deleteIndex(QModelIndex index);
|
||||
void deleteAll();
|
||||
|
Loading…
Reference in New Issue
Block a user