# HG changeset patch # User nadvornik # Date 1248440214 0 # Node ID c029adbabb7090d3b6cd404460d4f505095dc54b # Parent 6b0e71b96ab639a0e51c8b802b689be692695e40 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 diff -r 6b0e71b96ab6 -r c029adbabb70 src/image.c --- a/src/image.c Fri Jul 24 12:45:42 2009 +0000 +++ b/src/image.c Fri Jul 24 12:56:54 2009 +0000 @@ -1413,6 +1413,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); } diff -r 6b0e71b96ab6 -r c029adbabb70 src/layout_image.c --- a/src/layout_image.c Fri Jul 24 12:45:42 2009 +0000 +++ b/src/layout_image.c Fri Jul 24 12:56:54 2009 +0000 @@ -1881,9 +1881,11 @@ layout_image_set_collection(lw, cd, new); return; } + layout_image_set_fd(lw, NULL); } - - layout_image_set_fd(lw, NULL); + + /* the image will be set to the next image from the list soon, + setting it to NULL here is not necessary*/ } }