forked from enlightenment/efl
edje_cc: fixup edje_collections_lookup hash ids during collection pruning
Summary: unused groups are pruned during this stage of edje_cc, and it becomes necessary to update the values in this hash in order to maintain the key:value pairing between the Edje_Part_Collection_Directory_Entry and its corresponding Edje_Part_Collection so that lookups return consistent results after pruning has completed @fix Reviewers: cedric, Hermet Reviewed By: Hermet Subscribers: Hermet, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6041
This commit is contained in:
parent
4e386c883a
commit
334718a006
|
@ -3721,6 +3721,7 @@ data_process_lookups(void)
|
|||
ERR("A collection without a name was detected, that's not allowed.");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
find = eina_hash_find(edje_file->collection, pc->part);
|
||||
if (find && find->id == pc->id)
|
||||
{
|
||||
|
@ -3747,17 +3748,21 @@ data_process_lookups(void)
|
|||
EINA_LIST_FOREACH(edje_collections, l3, pc)
|
||||
{
|
||||
Eina_List *l4;
|
||||
Edje_Part_Collection_Directory_Entry *de;
|
||||
|
||||
/* Some group could be removed from the collection, but still be referenced by alias */
|
||||
find = eina_hash_find(edje_file->collection, pc->part);
|
||||
if (pc->id != find->id) find = NULL;
|
||||
|
||||
/* Update all matching alias */
|
||||
EINA_LIST_FOREACH(aliases, l4, alias)
|
||||
if (pc->id == alias->id)
|
||||
alias->id = id;
|
||||
|
||||
pc->id = id++;
|
||||
find = eina_hash_find(edje_file->collection, pc->part);
|
||||
if (pc->id != find->id) find = NULL;
|
||||
|
||||
de = eina_hash_find(edje_collections_lookup, &pc->id);
|
||||
eina_hash_set(edje_collections_lookup, &pc->id, NULL);
|
||||
de->id = pc->id = id++;
|
||||
eina_hash_set(edje_collections_lookup, &pc->id, de);
|
||||
if (find) find->id = pc->id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue