mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 13:02:49 -05:00
parent
6c663a19bf
commit
967a9f0195
@ -214,10 +214,22 @@ void DatabaseWidget::createEntry()
|
|||||||
m_newEntry->setUuid(Uuid::random());
|
m_newEntry->setUuid(Uuid::random());
|
||||||
m_newEntry->setUsername(m_db->metadata()->defaultUserName());
|
m_newEntry->setUsername(m_db->metadata()->defaultUserName());
|
||||||
m_newParent = m_groupView->currentGroup();
|
m_newParent = m_groupView->currentGroup();
|
||||||
if (m_newParent->iconNumber() != Group::DefaultIconNumber) {
|
setIconFromParent();
|
||||||
|
switchToEntryEdit(m_newEntry, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DatabaseWidget::setIconFromParent()
|
||||||
|
{
|
||||||
|
if (m_newParent->iconNumber() == Group::DefaultIconNumber && m_newParent->iconUuid().isNull()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_newParent->iconUuid().isNull()) {
|
||||||
m_newEntry->setIcon(m_newParent->iconNumber());
|
m_newEntry->setIcon(m_newParent->iconNumber());
|
||||||
}
|
}
|
||||||
switchToEntryEdit(m_newEntry, true);
|
else {
|
||||||
|
m_newEntry->setIcon(m_newParent->iconUuid());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseWidget::cloneEntry()
|
void DatabaseWidget::cloneEntry()
|
||||||
|
@ -129,6 +129,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void setClipboardTextAndMinimize(const QString& text);
|
void setClipboardTextAndMinimize(const QString& text);
|
||||||
|
void setIconFromParent();
|
||||||
|
|
||||||
Database* m_db;
|
Database* m_db;
|
||||||
const QScopedPointer<Ui::SearchWidget> m_searchUi;
|
const QScopedPointer<Ui::SearchWidget> m_searchUi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user