jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a4b79fdbe16e1495c187dc4f9da99924cf51e539

commit a4b79fdbe16e1495c187dc4f9da99924cf51e539
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Jul 4 11:37:37 2017 +0900

    layout: Fix default content part
    
    This fixes call to:
      elm_layout_content_set(ly, NULL, obj);
    
    This only affect this legacy API, not the EO interface.
    
    Thanks Dave for the report!
    
    Ref 59081043a892f6db74a1d557c7422c7a543c909d
---
 src/lib/elementary/elm_layout.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 84ec27f52a..ad5de01f60 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -1012,7 +1012,11 @@ elm_layout_content_set(Evas_Object *obj,
                        Evas_Object *content)
 {
    ELM_LAYOUT_CHECK(obj) EINA_FALSE;
-
+   if (!swallow)
+     {
+        swallow = elm_widget_default_content_part_get(obj);
+        if (!swallow) return EINA_FALSE;
+     }
    return efl_content_set(efl_part(obj, swallow), content);
 }
 
@@ -1089,7 +1093,11 @@ elm_layout_content_get(const Evas_Object *obj,
                        const char *swallow)
 {
    ELM_LAYOUT_CHECK(obj) NULL;
-
+   if (!swallow)
+     {
+        swallow = elm_widget_default_content_part_get(obj);
+        if (!swallow) return NULL;
+     }
    return efl_content_get(efl_part(obj, swallow));
 }
 

-- 


Reply via email to