Efl.Ui.Image: remove previous image when NULL is set

Summary:
when Efl.Ui.Image has an image,
         efl_file_set(efl_added, NULL, NULL) is not working.
         I think this should remove prevous image and go back to empty image.
         @fix

Reviewers: jpeg, cedric, eunue, woohyun, Jaehyun_Cho

Subscribers: Blackmole

Differential Revision: https://phab.enlightenment.org/D5742
This commit is contained in:
Sungtaek Hong 2018-01-29 13:21:49 +09:00 committed by Jean-Philippe Andre
parent 596c88f899
commit 30593b19ba
1 changed files with 4 additions and 4 deletions

View File

@ -1129,11 +1129,11 @@ _efl_ui_image_efl_file_file_set(Eo *obj, Efl_Ui_Image_Data *sd, const char *file
sd->anim = EINA_FALSE;
}
if (!file && !sd->prev_img) return EINA_FALSE;
else if (!file && sd->prev_img)
if (!file)
{
_prev_img_del(sd);
return EINA_TRUE;
if (sd->prev_img)
_prev_img_del(sd);
return _efl_ui_image_smart_internal_file_set(obj, sd, file, NULL, key);;
}
if (_efl_ui_image_is_remote(file))