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
This commit is contained in:
Taehyub Kim 2020-06-12 16:14:56 +09:00 committed by Stefan Schmidt
parent b9d126d2e2
commit d72bf1fcae
1 changed files with 6 additions and 1 deletions

View File

@ -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)
{