diff --git a/src/core/Database.cpp b/src/core/Database.cpp index d1c0fea4d..d3f87a7b4 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -328,6 +328,15 @@ void Database::emptyRecycleBin() void Database::merge(const Database* other) { m_rootGroup->merge(other->rootGroup()); + + for (Uuid customIconId : other->metadata()->customIcons().keys()) { + QImage customIcon = other->metadata()->customIcon(customIconId); + if (!this->metadata()->containsCustomIcon(customIconId)) { + qDebug("Adding custom icon %s to database.", qPrintable(customIconId.toHex())); + this->metadata()->addCustomIcon(customIconId, customIcon); + } + } + emit modified(); }