bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b0549bb8cccead28182ed89dd63598e547032075
commit b0549bb8cccead28182ed89dd63598e547032075 Author: Marcel Hollerbach <[email protected]> Date: Mon Apr 1 14:45:19 2019 +0200 efl_ui_box: print more errors, when a element is added two times, we should print an error. Same for removing a child that is not part of this container. Reviewed-by: Xavi Artigas <[email protected]> Differential Revision: https://phab.enlightenment.org/D8522 --- src/lib/elementary/efl_ui_box.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index 5e33ed8602..dbe9991cd8 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -47,7 +47,10 @@ static inline Eina_Bool _efl_ui_box_child_register(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj) { if (!subobj || (efl_canvas_object_render_parent_get(subobj) == obj)) - return EINA_FALSE; + { + ERR("subobj %p %s is already added to this", subobj, efl_class_name_get(subobj) ); + return EINA_FALSE; + } if (!efl_ui_widget_sub_object_add(obj, subobj)) return EINA_FALSE; @@ -66,6 +69,11 @@ _efl_ui_box_child_register(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj) static inline Eina_Bool _efl_ui_box_child_unregister(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj) { + if (efl_canvas_object_render_parent_get(subobj) != obj) + { + ERR("subobj %p %s is not part of this widget", subobj, efl_class_name_get(subobj) ); + return EINA_FALSE; + } if (!subobj || !_elm_widget_sub_object_redirect_to_top(obj, subobj)) return EINA_FALSE; --
