zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=642dc1fe85f96747082996396c012e77d781716d
commit 642dc1fe85f96747082996396c012e77d781716d Author: Marcel Hollerbach <[email protected]> Date: Wed Apr 24 17:56:35 2019 +0200 efl_ui_grid: fixup pack APIs the APIs in pack should only allow a single registeration of a item. And when this item is registered, the parent should be set accordingly. Reviewed-by: SangHyeon Jade Lee <[email protected]> Differential Revision: https://phab.enlightenment.org/D8702 --- src/lib/elementary/efl_ui_grid.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 8e0974dd12..aee45475c8 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -933,6 +933,15 @@ _grid_item_process(Eo *obj, Efl_Ui_Grid_Data *pd, EINA_UNUSED Efl_Ui_Grid_Item * { EFL_UI_GRID_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); + if (eina_list_data_find(pd->items, it)) + { + ERR("Item already added to this container!"); + return EINA_FALSE; + } + + if (!efl_ui_widget_sub_object_add(obj, it)) + return EINA_FALSE; + //FIXME: This is tricky workaround for set select mode and parent value. EFL_UI_GRID_ITEM_DATA_GET_OR_RETURN(it, gd, EINA_FALSE); EFL_UI_ITEM_DATA_GET_OR_RETURN(it, id, EINA_FALSE); --
