mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-26 20:06:41 -08:00
Fix creation of history item when a new entry is added.
Add corresponding gui test.
This commit is contained in:
1 parent
887e4067ec
commit
44489bf6f8
4 files changed
+63
-2
No files matched your search
@@ -134,6 +134,7 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, const QString& groupN
|
||||
{
|
||||
m_entry = entry;
|
||||
m_metadata = metadata;
|
||||
m_create = create;
|
||||
|
||||
if (create) {
|
||||
m_ui->headerLabel->setText(groupName+" > "+tr("Add entry"));
|
||||
@@ -212,7 +213,9 @@ void EditEntryWidget::saveEntry()
|
||||
|
||||
m_currentAttribute = QPersistentModelIndex();
|
||||
|
||||
m_entry->beginUpdate();
|
||||
if (!m_create) {
|
||||
m_entry->beginUpdate();
|
||||
}
|
||||
|
||||
m_entry->setTitle(m_mainUi->titleEdit->text());
|
||||
m_entry->setUsername(m_mainUi->usernameEdit->text());
|
||||
@@ -245,7 +248,9 @@ void EditEntryWidget::saveEntry()
|
||||
}
|
||||
}
|
||||
|
||||
m_entry->endUpdate();
|
||||
if (!m_create) {
|
||||
m_entry->endUpdate();
|
||||
}
|
||||
|
||||
m_entry = 0;
|
||||
m_entryAttributes->clear();
|
||||
|
||||
Reference in new issue
Block a user