bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f7baa89ca9e99eea3f41898ee0089a48875883ed

commit f7baa89ca9e99eea3f41898ee0089a48875883ed
Author: Marcel Hollerbach <[email protected]>
Date:   Thu Apr 4 13:30:08 2019 +0200

    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 <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D8555
---
 src/lib/elementary/efl_ui_table.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index 136e2f2473..2dabef1e64 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -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;
 }
 

-- 


Reply via email to