yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=58e8ef4251a9a8efecfc0c4ce93551eb1c04f9d3

commit 58e8ef4251a9a8efecfc0c4ce93551eb1c04f9d3
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Tue Nov 24 18:48:12 2015 +0200

    Use proper API to get type of container
---
 src/bin/gui/editor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 00f41ab..6f12383 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -4007,12 +4007,11 @@ _content_change_from_propview(void *data EINA_UNUSED, 
Eo *obj, const Eo_Event_De
              /* Check if new_widget was packed previously: take it's parent 
and check
               * if widget is packed into it's parent.
               * If so, we need to unpack widget and delete from contents*/
-             Gui_Widget *prev_wdg_container = (Gui_Widget *) 
wdg_parent_get(new_param_wdg);
-             if (!wdg_obj_container_item_get(prev_wdg_container, -1, 
new_value))
-               prev_wdg_container = NULL;
+             Eid *prev_parent_cont_eid = 
wdg_parent_container_eid_get(new_param_wdg);
+             Gui_Widget *prev_wdg_container = prev_parent_cont_eid ? 
wdg_get(prev_parent_cont_eid) : NULL;
 
              Gui_Session *session = (Gui_Session *) 
gui_context_editor_session_get(ctx);
-             if (prev_wdg_container)
+             if (prev_wdg_container && 
(wdg_container_type_get(prev_wdg_container) == OBJ_CONTAINER))
                {
                   Object_Container *_old_prev_container, *_new_prev_container;
                   _old_prev_container = (Object_Container *) 
wdg_obj_container_get((Gui_Widget *) prev_wdg_container);

-- 


Reply via email to