cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=f3844dcef81ac4c6a74513469d21040169002253

commit f3844dcef81ac4c6a74513469d21040169002253
Author: jiin.moon <jiin.m...@samsung.com>
Date:   Tue Sep 15 10:25:31 2015 +0200

    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
---
 src/lib/elm_image.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 9c043b8..713ad65 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,
    else
      evas_object_image_file_set(sd->img, file, key);
 
-   if (sd->preload_status != ELM_IMAGE_PRELOAD_DISABLED)
-     {
-        evas_object_hide(sd->img);
-        sd->preload_status = ELM_IMAGE_PRELOADING;
-        evas_object_image_preload(sd->img, EINA_FALSE);
-     }
-
    if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
      {
         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,
         return;
      }
 
+   if (sd->preload_status != ELM_IMAGE_PRELOAD_DISABLED)
+     {
+        evas_object_hide(sd->img);
+        sd->preload_status = ELM_IMAGE_PRELOADING;
+        evas_object_image_preload(sd->img, EINA_FALSE);
+     }
+
    _elm_image_internal_sizing_eval(obj, sd);
 
    if (ret) *ret = EINA_TRUE;

-- 


Reply via email to