aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-01 13:26:15 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-01 13:26:15 +0200
commit93572312ee812f32812145ec0441710e47c24f0d (patch)
tree54abeaaf2859088f1694b78ab8ec6038df45e88b
parenttest-suite-wip (diff)
downloadefl-devs/bu5hm4n/poc_behavior_testing.tar.gz
-rw-r--r--src/lib/elementary/efl_ui_box.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c
index 4b66f0dabd..c699a6b3aa 100644
--- a/src/lib/elementary/efl_ui_box.c
+++ b/src/lib/elementary/efl_ui_box.c
@@ -335,6 +335,9 @@ _efl_ui_box_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
Evas_Object_Box_Data *bd;
int cnt;
+ if (!elm_widget_sub_object_add(obj, subobj))
+ return EINA_FALSE;
+
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
bd = evas_object_smart_data_get(wd->resize_obj);
@@ -346,7 +349,12 @@ _efl_ui_box_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
index %= cnt;
if (index < 0) index += cnt;
}
- return (evas_object_box_insert_at(wd->resize_obj, subobj, index) != NULL);
+ if (!evas_object_box_insert_at(wd->resize_obj, subobj, index))
+ {
+ ERR("This widget is already added");
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
}
}