Eo: don't reparent if it's the same parent.
authortasn <tasn>
Thu, 7 Jun 2012 07:17:42 +0000 (07:17 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 7 Jun 2012 07:17:42 +0000 (07:17 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@71774 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

lib/eo.c

index 99e606b..f727da1 100644 (file)
--- a/lib/eo.c
+++ b/lib/eo.c
@@ -1069,6 +1069,9 @@ eo_parent_set(Eo *obj, const Eo *parent)
    if (parent)
       EO_MAGIC_RETURN_VAL(parent, EO_EINA_MAGIC, EINA_FALSE);
 
+   if (obj->parent == parent)
+      return EINA_TRUE;
+
    _eo_ref(obj);
 
    if (obj->parent)
@@ -1166,7 +1169,6 @@ eo_xref_internal(Eo *obj, const Eo *ref_obj, const char *file, int line)
    xref->file = file;
    xref->line = line;
 
-   /* FIXME: Make it sorted. */
    obj->xrefs = eina_inlist_prepend(obj->xrefs, EINA_INLIST_GET(xref));
 #else
    (void) ref_obj;