From 6c663a19bf681ededea01a9552a19ce6da1584a4 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Tue, 29 Oct 2013 22:00:02 -0400 Subject: [PATCH] Use folder icon when not defaut icon --- src/gui/DatabaseWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 56ab8b6ac..1251dc2c2 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -29,6 +29,7 @@ #include "autotype/AutoType.h" #include "core/Config.h" #include "core/FilePath.h" +#include "core/Group.h" #include "core/Metadata.h" #include "core/Tools.h" #include "gui/ChangeMasterKeyWidget.h" @@ -213,6 +214,9 @@ 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) { + m_newEntry->setIcon(m_newParent->iconNumber()); + } switchToEntryEdit(m_newEntry, true); }