mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
6c663a19bf
commit
967a9f0195
@ -214,10 +214,22 @@ void DatabaseWidget::createEntry()
|
||||
m_newEntry->setUuid(Uuid::random());
|
||||
m_newEntry->setUsername(m_db->metadata()->defaultUserName());
|
||||
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());
|
||||
}
|
||||
switchToEntryEdit(m_newEntry, true);
|
||||
else {
|
||||
m_newEntry->setIcon(m_newParent->iconUuid());
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::cloneEntry()
|
||||
|
@ -129,6 +129,7 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void setClipboardTextAndMinimize(const QString& text);
|
||||
void setIconFromParent();
|
||||
|
||||
Database* m_db;
|
||||
const QScopedPointer<Ui::SearchWidget> m_searchUi;
|
||||
|
Loading…
Reference in New Issue
Block a user