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 59081043a8
This commit is contained in:
Jean-Philippe Andre 2017-07-04 11:37:37 +09:00
parent 19df2cd34f
commit a4b79fdbe1
1 changed files with 10 additions and 2 deletions

View File

@ -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));
}