From aacd4f9d2711718b40f7cc48924a3478631a13e9 Mon Sep 17 00:00:00 2001 From: cedric Date: Sun, 20 Nov 2011 18:27:14 +0000 Subject: [PATCH] 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 --- src/lib/edje_program.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) 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; } -- 2.7.4