Add entry clone functionality.

This commit is contained in:
Florian Geyer 2012-05-15 21:10:39 +02:00
parent 7ebee78c75
commit eb82df5994
8 changed files with 50 additions and 1 deletions

View file

@ -156,6 +156,16 @@ void DatabaseWidget::createEntry()
switchToEntryEdit(m_newEntry, true);
}
void DatabaseWidget::cloneEntry()
{
Entry* currentEntry = m_entryView->currentEntry();
Entry* entry = currentEntry->clone();
entry->setUuid(Uuid::random());
entry->setGroup(currentEntry->group());
m_entryView->setFocus();
m_entryView->setCurrentEntry(entry);
}
void DatabaseWidget::deleteEntry()
{
bool inRecylceBin = Tools::hasChild(m_db->metadata()->recycleBin(), m_entryView->currentEntry());