edje: Remove invalid call to recalc in efl_part
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 26 Jul 2016 09:27:24 +0000 (18:27 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 26 Jul 2016 09:57:38 +0000 (18:57 +0900)
What a mess... Assuming efl_part() had no side effect on the
object it took me hours to figure out that there was a wrong
call to _edje_recalc_do in the efl_part() function itself.
That was bad, and existed because efl_part() used to be
efl_content_get().

efl_part() should not have any side effect.

Also, fix a return value in content_remove.

Fixes T4214 (invalid redraw and crash in terminology).

src/lib/edje/edje_util.c

index 887e820..3a4291b 100644 (file)
@@ -3906,7 +3906,7 @@ _edje_object_efl_container_content_remove(Eo *obj EINA_UNUSED, Edje *ed, Evas_Ob
      if ((eud->type == EDJE_USER_SWALLOW) && (eud->u.swallow.child == obj_swallow))
        {
           _edje_user_definition_free(eud);
-          return EINA_FALSE;
+          return EINA_TRUE;
        }
 
    _edje_real_part_swallow_clear(ed, rp);
@@ -3971,9 +3971,6 @@ _edje_object_efl_part_part(Eo *obj, Edje *ed, const char *part)
 
    if ((!ed) || (!part)) return NULL;
 
-   /* Need to recalc before providing the object. */
-   _edje_recalc_do(ed);
-
    rp = _edje_real_part_recursive_get(&ed, part);
    if (!rp) return NULL;