summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2015-09-15 10:25:31 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-09-15 10:25:31 +0200
commitf3844dcef81ac4c6a74513469d21040169002253 (patch)
treec620afff813b691ecbd044ab07bf103adcd5adf1
parent95e5b988136d3f5e31d2a395beb77e172a392793 (diff)
elm_image : call the evas_object_image_load_error_get() before calling the image_preload api
Summary: If file path is wrong, don't need to call the image preload api. And the result of evas_object_image_load_error_get api is not correct after calling the image_preload api. I will check more about it. Reviewers: cedric, Hermet, jpeg Reviewed By: jpeg Differential Revision: https://phab.enlightenment.org/D3039
-rw-r--r--src/lib/elm_image.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 9c043b8c7..713ad6592 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -1019,13 +1019,6 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data *sd,
1019 else 1019 else
1020 evas_object_image_file_set(sd->img, file, key); 1020 evas_object_image_file_set(sd->img, file, key);
1021 1021
1022 if (sd->preload_status != ELM_IMAGE_PRELOAD_DISABLED)
1023 {
1024 evas_object_hide(sd->img);
1025 sd->preload_status = ELM_IMAGE_PRELOADING;
1026 evas_object_image_preload(sd->img, EINA_FALSE);
1027 }
1028
1029 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE) 1022 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
1030 { 1023 {
1031 ERR("Things are going bad for '%s' (%p)", file, sd->img); 1024 ERR("Things are going bad for '%s' (%p)", file, sd->img);
@@ -1033,6 +1026,13 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data *sd,
1033 return; 1026 return;
1034 } 1027 }
1035 1028
1029 if (sd->preload_status != ELM_IMAGE_PRELOAD_DISABLED)
1030 {
1031 evas_object_hide(sd->img);
1032 sd->preload_status = ELM_IMAGE_PRELOADING;
1033 evas_object_image_preload(sd->img, EINA_FALSE);
1034 }
1035
1036 _elm_image_internal_sizing_eval(obj, sd); 1036 _elm_image_internal_sizing_eval(obj, sd);
1037 1037
1038 if (ret) *ret = EINA_TRUE; 1038 if (ret) *ret = EINA_TRUE;