forked from enlightenment/efl
edje_cc: correctly copy part descriptions when setting part type
in the case where a part is inherited, changing the type will lead to broken part/program lookups for the part during resolving in write-out; memcpy alone is not enough to fix this. @fix
This commit is contained in:
parent
6eff8ab5ba
commit
e14dc0f11d
|
@ -5076,8 +5076,13 @@ _part_type_set(unsigned int type)
|
|||
if (previous)
|
||||
{
|
||||
new = _edje_part_description_alloc(type, pc->part, ep->name);
|
||||
memcpy(new, previous, sizeof (Edje_Part_Description_Common));
|
||||
eina_hash_add(desc_hash, &new, ep);
|
||||
parent_desc = previous;
|
||||
new->state.name = strdup(previous->state.name);
|
||||
new->state.value = previous->state.value;
|
||||
st_collections_group_parts_part_description_inherit();
|
||||
parent_desc = NULL;
|
||||
_part_desc_free(pc, ep, previous);
|
||||
|
||||
ep->default_desc = new;
|
||||
}
|
||||
|
@ -5086,8 +5091,13 @@ _part_type_set(unsigned int type)
|
|||
{
|
||||
previous = ep->other.desc[i];
|
||||
new = _edje_part_description_alloc(type, pc->part, ep->name);
|
||||
memcpy(new, previous, sizeof (Edje_Part_Description_Common));
|
||||
eina_hash_add(desc_hash, &new, ep);
|
||||
parent_desc = previous;
|
||||
new->state.name = strdup(previous->state.name);
|
||||
new->state.value = previous->state.value;
|
||||
st_collections_group_parts_part_description_inherit();
|
||||
parent_desc = NULL;
|
||||
_part_desc_free(pc, ep, previous);
|
||||
ep->other.desc[i] = new;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue