efl_ui_pager: ensure objects are added and deduplicated

everything else will make things fall apart

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8741
This commit is contained in:
Marcel Hollerbach 2019-04-26 17:19:37 +02:00
parent 67e4f21c88
commit c52dcdac91
1 changed files with 8 additions and 0 deletions

View File

@ -401,6 +401,14 @@ _efl_ui_pager_efl_container_content_count(Eo *obj EINA_UNUSED,
static Eina_Bool
_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj)
{
if (eina_list_data_find(pd->content_list, subobj))
{
ERR("Object already added!");
return EINA_FALSE;
}
if (!efl_ui_widget_sub_object_add(obj, subobj))
return EINA_FALSE;
if (!pd->transition)
efl_canvas_object_clipper_set(subobj, pd->backclip);