diff src/image.c @ 1701:2309e6150e8c

do not try to reload deleted image deleted image is replaced by the next one from the list, keep the old image displayed until the new one is set
author nadvornik
date Fri, 24 Jul 2009 12:56:54 +0000
parents b8235f919d6b
children 155268f3bc76
line wrap: on
line diff
--- a/src/image.c	Fri Jul 24 12:45:42 2009 +0000
+++ b/src/image.c	Fri Jul 24 12:56:54 2009 +0000
@@ -1442,6 +1442,8 @@
 
 	if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd == imd->image_fd)
 		{
+		if ((type & NOTIFY_CHANGE) && fd->change && fd->change->type == FILEDATA_CHANGE_DELETE)
+			return; /* keep the image displayed, it will be replaced by the next image from the list soon */
 		DEBUG_1("Notify image: %s %04x", fd->path, type);
 		image_reload(imd);
 		}