Summary: | Thumbnail view not updated after changing comments | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Dik Takken <kde> |
Component: | Thumbs-Image | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version First Reported In: | 0.7.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dik Takken
2005-04-07 23:17:33 UTC
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; } |