edje: fix bug when using filter with edje cache turned on.

SVN revision: 65458
This commit is contained in:
Cedric BAIL 2011-11-20 18:27:14 +00:00
parent c34434dedf
commit 4638a297ef
1 changed files with 23 additions and 9 deletions

View File

@ -1029,10 +1029,6 @@ static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt)
Edje_Real_Part *rp = NULL; Edje_Real_Part *rp = NULL;
Eina_Bool exec = EINA_TRUE; Eina_Bool exec = EINA_TRUE;
#ifdef EDJE_PROGRAM_CACHE
data->matched++;
#endif
if (pr->filter.state) if (pr->filter.state)
{ {
rp = _edje_real_part_get(data->ed, pr->filter.part ? pr->filter.part : data->source); 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); exec = (rp->chosen_description->state.name == pr->filter.state);
} }
#ifdef EDJE_PROGRAM_CACHE
data->matched++;
#endif
if (exec) if (exec)
_edje_program_run(data->ed, pr, 0, data->signal, data->source); _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) EINA_LIST_FOREACH(matches, l, pr)
{ {
_edje_program_run(ed, pr, 0, sig, src); Eina_Bool exec = EINA_TRUE;
if (_edje_block_break(ed))
{ if (pr->filter.state)
goto break_prog; {
} 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; done = 1;
} }