Cancel preload if file a new file is set.

SVN revision: 38313
This commit is contained in:
Gustavo Sverzut Barbieri 2008-12-23 23:15:53 +00:00
parent 68bd5fb68b
commit f4ccaaa15d
1 changed files with 5 additions and 0 deletions

View File

@ -264,6 +264,11 @@ evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
if ((o->cur.key) && (key) && (!strcmp(o->cur.key, key)))
return;
}
if (!o->engine_data)
obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
o->engine_data);
if (o->cur.file) eina_stringshare_del(o->cur.file);
if (o->cur.key) eina_stringshare_del(o->cur.key);
if (file) o->cur.file = eina_stringshare_add(file);