Version: 0.7.2 (using KDE KDE 3.3.2) Installed from: Gentoo Packages OS: Linux When DigiKam is configured to display EXIF comments in the thumbnail view and the EXIF comments are edited, the thumbnail view does not refresh the changed comments.
CVS commit by pahlibar: refresh the file metainfo if the user selects to save comments embedded in the file. BUGS: 103458 M +17 -0 albumiconitem.cpp 1.31 M +1 -0 albumiconitem.h 1.10 M +17 -10 imagedescedit.cpp 1.42 --- kdeextragear-3/digikam/digikam/albumiconitem.cpp #1.30:1.31 @@ -151,4 +151,21 @@ void AlbumIconItem::setPixmap(const QPix } +void AlbumIconItem::setMetaInfo(const KFileMetaInfo* metaInfo) +{ + if (metaInfo_) + { + delete metaInfo_; + metaInfo_ = 0; + } + metaInfo_ = metaInfo; + + QRect r(view_->contentsX(), view_->contentsY(), + view_->visibleWidth(), view_->visibleHeight()); + if (r.intersects(rect())) + { + repaint(); + } +} + int AlbumIconItem::compare(ThumbItem *item) { --- kdeextragear-3/digikam/digikam/albumiconitem.h #1.9:1.10 @@ -68,4 +68,5 @@ public: void setPixmap(const QPixmap& thumb, const KFileMetaInfo* metaInfo); + void setMetaInfo(const KFileMetaInfo* metaInfo); QRect thumbnailRect() const; --- kdeextragear-3/digikam/digikam/imagedescedit.cpp #1.41:1.42 @@ -288,15 +288,22 @@ void ImageDescEdit::slotApply() { // store as JPEG Exif comment - KFileMetaInfo metaInfo(fileURL.path(), "image/jpeg", KFileMetaInfo::Fastest); + KFileMetaInfo* metaInfo = + new KFileMetaInfo(fileURL.path(), "image/jpeg", KFileMetaInfo::Fastest); // set Jpeg comment - if (metaInfo.isValid () && metaInfo.mimeType() == "image/jpeg" - && metaInfo.containsGroup("Jpeg EXIF Data")) + if (metaInfo->isValid () && metaInfo->mimeType() == "image/jpeg" + && metaInfo->containsGroup("Jpeg EXIF Data")) { kdDebug() << k_funcinfo << "Contains JPEG Exif data, setting comment" << endl; - metaInfo["Jpeg EXIF Data"].item("Comment") + (*metaInfo)["Jpeg EXIF Data"].item("Comment") .setValue(m_commentsEdit->text()); - metaInfo.applyChanges(); + metaInfo->applyChanges(); + m_currItem->setMetaInfo(metaInfo); + } + else + { + delete metaInfo; + metaInfo = 0; }