Efl.Ui.Image: remove previous image when NULL is set
authorSungtaek Hong <sth253.hong@samsung.com>
Mon, 29 Jan 2018 04:21:49 +0000 (13:21 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 3 Apr 2018 13:23:35 +0000 (22:23 +0900)
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

src/lib/elementary/efl_ui_image.c

index e8e6df9..0746d38 100644 (file)
@@ -1132,11 +1132,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))