jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=26f304bc60b58afddcaff525bb4db462ebe4eb2f

commit 26f304bc60b58afddcaff525bb4db462ebe4eb2f
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Tue Nov 24 13:45:36 2015 +0200

    Fix full widget copy
    
    - The previous parent was given for the new widget
    - The new child was added twice during copy ( the second one is in
    parent_set)
---
 src/lib/gui_widget.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index d1c9818..95dcf38 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -1307,7 +1307,6 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
    if (full)
      {
         Eid *child_id;
-        const char *wdg_name = wdg_name_get(src);
         EINA_LIST_FOREACH(src->props_list, itr, prop)
           {
              Gui_Widget_Property *new_prop = prop_copy(prop);
@@ -1322,8 +1321,7 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
              free(new_name);
              wdg_data_set(child, "_copy", eid);
              child = wdg_copy(child, eid, EINA_TRUE);
-             dest->children = eina_list_append(dest->children, eid);
-             wdg_parent_set(child, wdg_name);
+             wdg_parent_set(child, eid_name_get(dest_id));
           }
         if (src->obj_container)
           {
@@ -1341,7 +1339,7 @@ wdg_copy(const Gui_Widget *src, Eid *dest_id, Eina_Bool 
full)
                        eid = eid_new(ctx, new_name, EID_TYPE_WIDGET);
                        free(new_name);
                        child = wdg_copy(child, eid, EINA_TRUE);
-                       wdg_parent_set(child, wdg_name);
+                       wdg_parent_set(child, eid_name_get(dest_id));
                     }
                   if (eid)
                     {

-- 


Reply via email to