stefan pushed a commit to branch efl-1.24.

http://git.enlightenment.org/core/efl.git/commit/?id=d72bf1fcaea6c2bf45e2b232afeea8c2529cf43a

commit d72bf1fcaea6c2bf45e2b232afeea8c2529cf43a
Author: Taehyub Kim <taehyub....@samsung.com>
Date:   Fri Jun 12 16:14:56 2020 +0900

    efl_ui_image: fixed elm_image_preload_disabled_set api is not working when 
it is called before file set
    
    Summary:
    when elm_image_preload_disabled_set(img, EINA_TRUE) is called before file 
set.
    The image preload is not canceled, because the function will be returned 
since the image is not loaded.
    so preload disabled api is fixed to work even if it is called before file 
set.
    @fix
    
    Reviewers: Hermet, kimcinoo, jsuya
    
    Reviewed By: Hermet
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D11969
---
 src/lib/elementary/efl_ui_image.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index 4dea543391..55a197e7a0 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -2557,7 +2557,12 @@ elm_image_preload_disabled_set(Evas_Object *obj, 
Eina_Bool disable)
    EFL_UI_IMAGE_CHECK(obj);
    EFL_UI_IMAGE_DATA_GET(obj, sd);
 
-   if (sd->edje || !sd->img) return;
+   if (sd->edje) return;
+   if (!sd->img)
+     {
+        if (disable) sd->preload_status = EFL_UI_IMAGE_PRELOAD_DISABLED;
+        return;
+     }
 
    if (disable)
      {

-- 


Reply via email to