elm_panel: set content as a sub object of panel object 59/147659/1
authorJaeun Choi <jaeun12.choi@samsung.com>
Tue, 5 Sep 2017 07:14:37 +0000 (16:14 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Tue, 5 Sep 2017 08:16:58 +0000 (17:16 +0900)
since sd->bx is not an elm object, it is excluded from parent-child tree.
in case of a non-scrollable panel, the content needs to be attached to the tree
as a child of panel object directly.

Change-Id: I32b65fc2e2b213e510c3060ac877a4361653191a
origin: upstream (61381f6e3584118a70565eea79c355dd049b9e28)

src/lib/elm_panel.c

index af9ff60ef3ad360019699f4e2e8e726c3ddd0d08..cdbb848b066eecdc26c14adf778e3f090bcb8d19 100644 (file)
@@ -1047,6 +1047,7 @@ _elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa
              Eina_Bool int_ret = EINA_TRUE;
              eo_do_super(obj, MY_CLASS,
                          int_ret = elm_obj_container_content_set(part, content));
+
              return int_ret;
           }
      }
@@ -1061,6 +1062,8 @@ _elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa
         evas_object_show(sd->content);
         if (sd->scrollable)
           elm_widget_sub_object_add(sd->scr_ly, sd->content);
+        else
+          elm_widget_sub_object_add(obj, sd->content);
      }
 
    elm_layout_sizing_eval(obj);
@@ -1776,7 +1779,7 @@ _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool scrollable)
 
         elm_layout_content_unset(sd->scr_ly, "elm.swallow.content");
         elm_layout_content_set(obj, "elm.swallow.content", sd->bx);
-        if (sd->content) elm_widget_sub_object_add(sd->bx, sd->content);
+        if (sd->content) elm_widget_sub_object_add(obj, sd->content);
      }
 }