comparison src/image.c @ 1731:155268f3bc76

do not reload image on copy, move, rename and external editor changed files should be detected anyway http://sourceforge.net/tracker/index.php?func=detail&aid=2848373&group_id=222125&atid=1054680
author nadvornik
date Thu, 03 Sep 2009 19:18:20 +0000
parents 2309e6150e8c
children 9a20074dbd8f
comparison
equal deleted inserted replaced
1730:67145eade000 1731:155268f3bc76
1438 /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */ 1438 /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */
1439 !imd->image_fd || /* nothing to reload */ 1439 !imd->image_fd || /* nothing to reload */
1440 imd->state == IMAGE_STATE_NONE /* loading not started, no need to reload */ 1440 imd->state == IMAGE_STATE_NONE /* loading not started, no need to reload */
1441 ) return; 1441 ) return;
1442 1442
1443 if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd == imd->image_fd) 1443 if ((type & NOTIFY_REREAD) && fd == imd->image_fd)
1444 { 1444 {
1445 if ((type & NOTIFY_CHANGE) && fd->change && fd->change->type == FILEDATA_CHANGE_DELETE) 1445 /* there is no need to reload on NOTIFY_CHANGE,
1446 return; /* keep the image displayed, it will be replaced by the next image from the list soon */ 1446 modified files should be detacted anyway and NOTIFY_REREAD should be recieved
1447 or they are removed from the filelist completely on "move" and "delete"
1448 */
1447 DEBUG_1("Notify image: %s %04x", fd->path, type); 1449 DEBUG_1("Notify image: %s %04x", fd->path, type);
1448 image_reload(imd); 1450 image_reload(imd);
1449 } 1451 }
1450 } 1452 }
1451 1453