diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index bea10b995..c8545e428 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -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); } } diff --git a/src/gui/entry/EntryHistoryModel.cpp b/src/gui/entry/EntryHistoryModel.cpp index ca21055c6..21f0aec43 100644 --- a/src/gui/entry/EntryHistoryModel.cpp +++ b/src/gui/entry/EntryHistoryModel.cpp @@ -115,6 +115,11 @@ void EntryHistoryModel::clear() endResetModel(); } +void EntryHistoryModel::clearDeletedEntries() +{ + m_deletedHistoryEntries.clear(); +} + QList EntryHistoryModel::deletedEntries() { return m_deletedHistoryEntries; diff --git a/src/gui/entry/EntryHistoryModel.h b/src/gui/entry/EntryHistoryModel.h index a7434e013..6d186f049 100644 --- a/src/gui/entry/EntryHistoryModel.h +++ b/src/gui/entry/EntryHistoryModel.h @@ -37,6 +37,7 @@ public: void setEntries(const QList& entries); void clear(); + void clearDeletedEntries(); QList deletedEntries(); void deleteIndex(QModelIndex index); void deleteAll();