From: cedric Date: Sun, 20 Nov 2011 18:27:14 +0000 (+0000) Subject: edje: fix bug when using filter with edje cache turned on. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~531 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5ccdce2cb7290ac194646f9873b73af5ebca241;p=profile%2Fivi%2Fedje.git edje: fix bug when using filter with edje cache turned on. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@65458 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_program.c b/src/lib/edje_program.c index 931977c..bd18234 100644 --- a/src/lib/edje_program.c +++ b/src/lib/edje_program.c @@ -1029,10 +1029,6 @@ static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt) Edje_Real_Part *rp = NULL; Eina_Bool exec = EINA_TRUE; -#ifdef EDJE_PROGRAM_CACHE - data->matched++; -#endif - if (pr->filter.state) { rp = _edje_real_part_get(data->ed, pr->filter.part ? pr->filter.part : data->source); @@ -1040,6 +1036,10 @@ static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt) exec = (rp->chosen_description->state.name == pr->filter.state); } +#ifdef EDJE_PROGRAM_CACHE + data->matched++; +#endif + if (exec) _edje_program_run(data->ed, pr, 0, data->signal, data->source); @@ -1139,11 +1139,25 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src, { EINA_LIST_FOREACH(matches, l, pr) { - _edje_program_run(ed, pr, 0, sig, src); - if (_edje_block_break(ed)) - { - goto break_prog; - } + Eina_Bool exec = EINA_TRUE; + + if (pr->filter.state) + { + Edje_Real_Part *rp; + + rp = _edje_real_part_get(ed, pr->filter.part ? pr->filter.part : src); + if (rp) + exec = (rp->chosen_description->state.name == pr->filter.state); + } + + if (exec) + { + _edje_program_run(ed, pr, 0, sig, src); + if (_edje_block_break(ed)) + { + goto break_prog; + } + } } done = 1; }