Fix creation of history item when a new entry is added.

Add corresponding gui test.
This commit is contained in:
Florian Geyer committed 2012-05-11 09:16:45 +02:00
1 parent 887e4067ec
commit 44489bf6f8
4 files changed
+63 -2

No files matched your search

+7 -2
View File
@@ -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();