elm_panel: set content as a sub object of panel object 39/147639/3
authorJaeun Choi <jaeun12.choi@samsung.com>
Tue, 5 Sep 2017 07:14:37 +0000 (16:14 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 7 Sep 2017 02:58:42 +0000 (02:58 +0000)
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 ad1eee56ccd99dc1f719efbca1f536829be521c2..0662227a95c581a3ebbb19d2680fad0fb890a5b0 100644 (file)
@@ -1070,6 +1070,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;
           }
      }
@@ -1084,6 +1085,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);
@@ -1805,7 +1808,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);
      }
 }