summaryrefslogtreecommitdiff
path: root/src/PixbufCache.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-09 11:56:47 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-09 11:56:47 +0200
commit61daf2ebd98acb99ef2e06a743cf0dc76ecde3c6 (patch)
tree55c4c914bb35e1a85de2a95e10be499731e6d2d8 /src/PixbufCache.vala
parent1c172114dfae26e3861c65510b45d9f6b7bdab67 (diff)
parent7b10dbdcb4c9027cd6f4690d6d70a2f36b37ab26 (diff)
Merge branch 'master' of ssh://git.debian.org/git/collab-maint/shotwell
Diffstat (limited to 'src/PixbufCache.vala')
-rw-r--r--src/PixbufCache.vala12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/PixbufCache.vala b/src/PixbufCache.vala
index 8b8f276..0708f5e 100644
--- a/src/PixbufCache.vala
+++ b/src/PixbufCache.vala
@@ -265,6 +265,10 @@ public class PixbufCache : Object {
return;
}
+#if TRACE_PIXBUF_CACHE
+ debug("%s %s fetched into pixbuf cache", type.to_string(), job.photo.to_string());
+#endif
+
encache(job.photo, job.pixbuf);
// fire signal
@@ -279,16 +283,14 @@ public class PixbufCache : Object {
Photo photo = (Photo) object;
if (in_progress.has_key(photo)) {
- // Load is in progress, must cancel.
+ // Load is in progress, must cancel, but consider in-cache (since it was decached
+ // before being put into progress)
in_progress.get(photo).cancel();
in_progress.unset(photo);
+ } else if (!cache.has_key(photo)) {
continue;
}
- // only interested if in this cache
- if (!cache.has_key(photo))
- continue;
-
decache(photo);
#if TRACE_PIXBUF_CACHE