evas vector: set proper parents of clone objects. 92/208592/2
authorHermet Park <hermetpark@gmail.com>
Wed, 26 Jun 2019 08:14:27 +0000 (17:14 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 26 Jun 2019 12:18:11 +0000 (12:18 +0000)
fill, marker, stroke need proper parent when they were cloned.

Here, they would get the container of the shape which is going to be copied.

@fix

Change-Id: I0fe4eb7b227d7f72826378e8c7ea1a96f3b4f14f

src/lib/evas/canvas/efl_canvas_vg_shape.c

index ac398eb..c7a3c65 100644 (file)
@@ -203,23 +203,22 @@ _efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_
    node = efl_duplicate(efl_super(obj, MY_CLASS));
    sd = efl_data_scope_get(node, MY_CLASS);
 
-   //FIXME: These fill, markers couldn't allow node as parent...
    if (pd->fill)
      {
         sd->fill = efl_duplicate(pd->fill);
-        efl_parent_set(sd->fill, node);
+        efl_parent_set(sd->fill, efl_parent_get(node));
      }
 
    if (pd->stroke.fill)
      {
         sd->stroke.fill = efl_duplicate(pd->stroke.fill);
-        efl_parent_set(sd->stroke.fill, node);
+        efl_parent_set(sd->stroke.fill, efl_parent_get(node));
      }
 
    if (pd->stroke.marker)
      {
         sd->stroke.marker = efl_duplicate(pd->stroke.marker);
-        efl_parent_set(sd->stroke.marker, node);
+        efl_parent_set(sd->stroke.marker, efl_parent_get(node));
      }
 
    efl_gfx_path_copy_from(node, obj);