From e158149868058694a8ac15516a1810e5e467ac83 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 7 Jun 2012 07:17:42 +0000 Subject: [PATCH] Eo: don't reparent if it's the same parent. SVN revision: 71774 --- legacy/eobj/lib/eo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/eobj/lib/eo.c b/legacy/eobj/lib/eo.c index 99e606bf51..f727da15ec 100644 --- a/legacy/eobj/lib/eo.c +++ b/legacy/eobj/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;