From 491b323d064df9c617a12289d251c15b3e1a1f58 Mon Sep 17 00:00:00 2001 From: Daniel Hirt Date: Sun, 10 Jul 2016 11:43:43 +0000 Subject: [PATCH] Ui text: instantiate canvas text obj before smart_add --- src/lib/elementary/efl_ui_text.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 370fb34535..2ef2c4ff65 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -3346,6 +3346,12 @@ _efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv) ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); + /* XXX: needs to be before efl_canvas_group_add, since the latter will + * trigger a layout_sizing_eval call and requires the canvas text object to + * be instantiated. */ + text_obj = eo_add(EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS, obj); + eo_composite_attach(obj, text_obj); + efl_canvas_group_add(eo_super(obj, MY_CLASS)); elm_widget_sub_object_parent_add(obj); @@ -3369,9 +3375,6 @@ _efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv) if (!elm_layout_theme_set(obj, "efl_ui_text", "base", elm_widget_style_get(obj))) CRI("Failed to set layout!"); - text_obj = eo_add(EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS, obj); - eo_composite_attach(obj, text_obj); - edje_object_part_swallow(priv->entry_edje, "elm.text", text_obj); evas_object_size_hint_weight_set (priv->entry_edje, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);