[Digikam-devel] [Bug 127179] Digikam-0.8.2-rc1 thumbnails does not adhere to the Rotate Images setting in Configure Digikam
Gilles Caulier
caulier.gilles at free.fr
Thu Aug 31 20:01:21 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=127179
------- Additional Comments From caulier.gilles free fr 2006-08-31 21:01 -------
SVN commit 579297 by cgilles:
digikam from trunk : with showfoto, refresh all thumbbar items if exif auto-rotation option is changed in setup
CCBUGS: 127179
M +30 -1 thumbbar.cpp
--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.cpp #579296:579297
@ -22,12 +22,20 @
*
* ============================================================ */
+// C Ansi includes.
+
+extern "C"
+{
+#include <unistd.h>
+}
+
// C++ includes.
#include <cmath>
// Qt includes.
-
+
+#include <qdir.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <qpainter.h>
@ -38,6 +46,7 @
// KDE includes.
+#include <kmdcodec.h>
#include <kfileitem.h>
#include <kapplication.h>
#include <kiconloader.h>
@ -138,6 +147,26 @
void ThumbBarView::setExifRotate(bool exifRotate)
{
d->exifRotate = exifRotate;
+ QString thumbCacheDir = QDir::homeDirPath() + "/.thumbnails/";
+
+ for (ThumbBarItem *item = d->firstItem; item; item = item->m_next)
+ {
+ // Remove all current album item thumbs from disk cache.
+
+ QString uri = "file://" + QDir::cleanDirPath(item->url().path(-1));
+ KMD5 md5(QFile::encodeName(uri));
+ uri = md5.hexDigest();
+
+ QString smallThumbPath = thumbCacheDir + "normal/" + uri + ".png";
+ QString bigThumbPath = thumbCacheDir + "large/" + uri + ".png";
+
+ ::unlink(QFile::encodeName(smallThumbPath));
+ ::unlink(QFile::encodeName(bigThumbPath));
+
+ invalidateThumb(item);
+ }
+
+ triggerUpdate();
}
int ThumbBarView::countItems()
More information about the Digikam-devel
mailing list