yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=2e24c92f56581b710b821ad55f2f643aa71211ca

commit 2e24c92f56581b710b821ad55f2f643aa71211ca
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Wed Dec 2 09:58:34 2015 +0200

    Refactoring and fixes introduced before
    
    Commit, used to fix container flows, introduced wrong unpacking.
---
 src/bin/gui/editor.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index f32e3fb..ad315b1 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -2737,29 +2737,27 @@ _drag_start_post(const Gui_Widget *wdg, const Eo 
*_wdg_eo)
 
              _obj_container_item_remove_helper(wdg_container, 
wdg_name_get(wdg));
 
-             /* If dummy widget was created, create Eo and pack it. */
-             Object_Container_Item *dummy_ci = 
wdg_obj_container_item_get(wdg_container, idx, NULL);
              Eo *wdg_cont_eo = session_eo_get(session, wdg_container);
-             if (dummy_ci)
+             if (!strcmp(wdg_class_name_get(wdg_container), 
DB_DEF_LAYOUT_CLASS))
                {
+                  /* If dummy widget was created, create Eo and pack it. */
+                  Object_Container_Item *dummy_ci = 
wdg_obj_container_item_get(wdg_container, idx, NULL);
                   Gui_Widget *dummy_wdg = 
wdg_get(obj_container_item_eid_get(dummy_ci));
                   manager_widget_create((Gui_Session *) session, dummy_wdg, 
NULL);
                   Eo *dummy_eo = session_eo_get(session, dummy_wdg);
                   eo_do(wdg_cont_eo, elm_obj_container_content_unset(part));
                   eo_do(wdg_cont_eo, elm_obj_container_content_set(part, 
dummy_eo));
                }
-
-             /* FIXME: wdg_eo is NULL when dragging from objtree. It can be 
changed but should be?*/
-             if (wdg_eo)
+             else if (!strcmp(wdg_class_name_get(wdg_container), 
DB_DEF_BOX_CLASS))
                {
-                  if (!strcmp(wdg_class_name_get(wdg_container), 
DB_DEF_BOX_CLASS))
-                    {
-                       eo_do(wdg_cont_eo, elm_obj_box_unpack(wdg_eo));
-                    }
-                  else if (!strcmp(wdg_class_name_get(wdg_container), 
DB_DEF_TABLE_CLASS))
-                    {
-                       eo_do(wdg_cont_eo, elm_obj_table_unpack(wdg_eo));
-                    }
+                  /* FIXME: wdg_eo is NULL when dragging from objtree. It can 
be changed but should be?*/
+                  if (wdg_eo)
+                    eo_do(wdg_cont_eo, elm_obj_box_unpack(wdg_eo));
+               }
+             else if (!strcmp(wdg_class_name_get(wdg_container), 
DB_DEF_TABLE_CLASS))
+               {
+                  if (wdg_eo)
+                    eo_do(wdg_cont_eo, elm_obj_table_unpack(wdg_eo));
                }
           }
         else if (wdg_container_type_get(wdg_container) == ITEM_CONTAINER)

-- 


Reply via email to