forked from enlightenment/efl
Evas filters: Avoid adding multiple sources under the same name
This commit is contained in:
parent
8570b38dd1
commit
28d469237b
|
@ -2736,12 +2736,19 @@ _filter_source_set(Eo *eo_obj, void *_pd, va_list *list)
|
|||
pgm = o->cur.filter.chain;
|
||||
if (!pgm)
|
||||
{
|
||||
Evas_Object *old;
|
||||
if (!proxy) return;
|
||||
if (!o->cur.filter.sources)
|
||||
{
|
||||
o->cur.filter.sources = eina_hash_string_small_new
|
||||
(EINA_FREE_CB(evas_object_unref));
|
||||
}
|
||||
else
|
||||
{
|
||||
old = eina_hash_find(o->cur.filter.sources, name);
|
||||
if (old == proxy) return;
|
||||
if (old) eina_hash_del(o->cur.filter.sources, name, old);
|
||||
}
|
||||
evas_object_ref(proxy);
|
||||
eina_hash_add(o->cur.filter.sources, name, proxy);
|
||||
o->cur.filter.changed = EINA_TRUE;
|
||||
|
|
|
@ -1386,6 +1386,7 @@ evas_filter_program_source_set(Evas_Filter_Program *pgm,
|
|||
Evas_Object *old;
|
||||
|
||||
old = eina_hash_find(pgm->proxies, name);
|
||||
if (old == object) return;
|
||||
if (old) eina_hash_del(pgm->proxies, name, old);
|
||||
|
||||
evas_object_ref(object);
|
||||
|
|
Loading…
Reference in New Issue