SVN commit 534226 by cgilles:
digikam from trunk : bugfix about batch tagging image : - Using tags settings not Rating settings to set tags in IPTC keywords. - Storing tag paths not tag names in IPTC keywords. CCMAIL: [hidden email] M +20 -6 albumiconview.cpp --- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #534225:534226 @@ -1690,17 +1690,24 @@ { AlbumIconItem *albumItem = static_cast<AlbumIconItem *>(it); ImageInfo* info = albumItem->imageInfo(); - QStringList oldKeywords = info->tagNames(); + QStringList oldKeywords = info->tagPaths(); + for (QStringList::iterator it = oldKeywords.begin(); it != oldKeywords.end(); ++it) + (*it).remove(0, 1); + info->setTag(tagID); // Store Image Tags like Iptc keywords tag. if (AlbumSettings::instance()) { - if (AlbumSettings::instance()->getSaveIptcRating()) + if (AlbumSettings::instance()->getSaveIptcTags()) { + QStringList tagPaths = info->tagPaths(); + for (QStringList::iterator it = tagPaths.begin(); it != tagPaths.end(); ++it) + (*it).remove(0, 1); + DMetadata metadata(info->filePath()); - metadata.setImageKeywords(oldKeywords, info->tagNames()); + metadata.setImageKeywords(oldKeywords, tagPaths); metadata.applyChanges(); } } @@ -1718,17 +1725,24 @@ { AlbumIconItem *albumItem = static_cast<AlbumIconItem *>(it); ImageInfo* info = albumItem->imageInfo(); - QStringList oldKeywords = info->tagNames(); + QStringList oldKeywords = info->tagPaths(); + for (QStringList::iterator it = oldKeywords.begin(); it != oldKeywords.end(); ++it) + (*it).remove(0, 1); + info->removeTag(tagID); // Update Image Tags like Iptc keywords tags. if (AlbumSettings::instance()) { - if (AlbumSettings::instance()->getSaveIptcRating()) + if (AlbumSettings::instance()->getSaveIptcTags()) { + QStringList tagPaths = info->tagPaths(); + for (QStringList::iterator it = tagPaths.begin(); it != tagPaths.end(); ++it) + (*it).remove(0, 1); + DMetadata metadata(info->filePath()); - metadata.setImageKeywords(oldKeywords, info->tagNames()); + metadata.setImageKeywords(oldKeywords, tagPaths); metadata.applyChanges(); } } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |