fix for replacing a generated image with a file, the image would stay generated.

not a show-stopper but confusing.
This commit is contained in:
Campbell Barton 2012-02-16 04:21:40 +00:00
parent a0feea1fc0
commit 30dddb9840

@ -886,6 +886,11 @@ static int image_replace_exec(bContext *C, wmOperator *op)
/* we cant do much if the str is longer then FILE_MAX :/ */
BLI_strncpy(sima->image->name, str, sizeof(sima->image->name));
if (BLI_testextensie_array(str, imb_ext_movie))
sima->image->source= IMA_SRC_MOVIE;
else
sima->image->source= IMA_SRC_FILE;
/* XXX unpackImage frees image buffers */
ED_preview_kill_jobs(C);