Fix content is not swallowed issue. 27/104827/1 master
authorWoochan Lee <wc0917.lee@samsung.com>
Wed, 14 Dec 2016 10:49:34 +0000 (19:49 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Wed, 14 Dec 2016 10:51:36 +0000 (19:51 +0900)
In the ui_view use case. the content is not swallowed
when user call set_content() when ui_view already activated.

Change-Id: I765d489ff679dce8b8a513d7f3f24eefdf3b0caf

src/lib/efl/UiBaseView.cpp

index 2145f81..7e6ab12 100644 (file)
@@ -56,6 +56,11 @@ int UiBaseView::setContent(Eo *content)
 
        if (content) {
                evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _contentDelCb, this);
+               auto viewmgr = UI_BASE_VIEWMGR;
+               if ((viewmgr->getBase() == this->getBase()) && (this->getState() == UI_VIEW_STATE_ACTIVATE)) {
+                       elm_layout_content_set(this->getBase(), "content", content);
+               }
+
                return UiIfaceView::setContent(content);
        }