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 <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8702
This commit is contained in:
parent
d4a5f1525e
commit
404dcc290b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue