From 96adb21c48b8ae5faef9ae3525f0ac8182f6081b Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Fri, 29 Oct 2010 16:51:01 +0200 Subject: [PATCH] Optimized thumbnail generation: If the image was not edited yet anyway, only the (fast) raw internal preview image is taken. So if you just downloaded the many pictures from the camera, your machine will not busy generating thumbnails. --- rtgui/filebrowserentry.cc | 4 ++-- rtgui/thumbnail.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index bbef581b6..68a5f9765 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -81,9 +81,9 @@ void FileBrowserEntry::refreshThumbnailImage () { } void FileBrowserEntry::refreshQuickThumbnailImage () { - + // Only make a (slow) processed preview if the picture has been edited at all if ( thumbnail && - thumbnail->isQuick() ) + thumbnail->isQuick() && thumbnail->isPParamsValid() ) { thumbImageUpdater->add(thumbnail, thumbnail->getProcParams(), preh, &updatepriority, true, this); } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 32da160e9..0373f4f3d 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -85,6 +85,7 @@ class Thumbnail { void loadProcParams (); bool isQuick() { return quick_; } + bool isPParamsValid() { return pparamsValid; } bool isRecentlySaved (); void imageDeveloped (); void imageEnqueued ();