forked from enlightenment/efl
efl_ui_box: do not perform insertion if existing is not added
this was brought up recently and it is true that this should be fixed. If existing is not registered in the container, then we should not perform the operation at all. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9860
This commit is contained in:
parent
588745e995
commit
9284418bea
|
@ -282,6 +282,8 @@ _efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Ent
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
|
||||
{
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_list_data_find(pd->children, existing), EINA_FALSE);
|
||||
|
||||
if (!_efl_ui_box_child_register(obj, pd, subobj))
|
||||
return EINA_FALSE;
|
||||
|
||||
|
@ -293,6 +295,8 @@ _efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_En
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
|
||||
{
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_list_data_find(pd->children, existing), EINA_FALSE);
|
||||
|
||||
if (!_efl_ui_box_child_register(obj, pd, subobj))
|
||||
return EINA_FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue