efl_ui_table: correctly delete all items when clearing / unpacking

otherwise we do not clear the internals, and fail to get the count to 0.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8555
This commit is contained in:
Marcel Hollerbach 2019-04-04 13:30:08 +02:00
parent 48778f3cfb
commit f7baa89ca9
1 changed files with 10 additions and 2 deletions

View File

@ -488,20 +488,28 @@ _efl_ui_table_efl_pack_unpack(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *su
}
EOLIAN static Eina_Bool
_efl_ui_table_efl_pack_pack_clear(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
_efl_ui_table_efl_pack_pack_clear(Eo *obj, Efl_Ui_Table_Data *pd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
while (pd->items)
_item_remove(obj, pd, pd->items->object);
evas_object_table_clear(wd->resize_obj, EINA_TRUE);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_ui_table_efl_pack_unpack_all(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
_efl_ui_table_efl_pack_unpack_all(Eo *obj, Efl_Ui_Table_Data *pd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
while (pd->items)
_item_remove(obj, pd, pd->items->object);
evas_object_table_clear(wd->resize_obj, EINA_FALSE);
return EINA_TRUE;
}