This commit is contained in:
Louis-Bertrand Varin 2017-10-07 10:30:39 -04:00 committed by Jonathan White
parent 157f1134bf
commit 2e81751131

View File

@ -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();
}