From: Hermet Park Date: Fri, 8 Jul 2016 12:36:48 +0000 (+0900) Subject: commit 9873358f68a7dd942fbc5fe64ae8da2b4d980331 X-Git-Tag: submit/tizen/20160711.050109~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5a3c217a76c7cf15601cd090523a07c4dbccfa8;p=platform%2Fupstream%2Fefl.git commit 9873358f68a7dd942fbc5fe64ae8da2b4d980331 Author: Hermet Park Date: Fri Jul 8 21:16:16 2016 +0900 edje: fix the map state issue. While the part state switching, map won't gonna be disabled again, due to the incorrect state checking. If there param1 indicates the current state with map off. then it should disable the map obviously. But It assumed the param1 is the previous state, not the current!, so the map didn't go disabled state. It was intended to avoid the duplicated map state setting. So to keeping the intention, now it disable the map, only if the map is actually enabled. So both are fine. @fix Change-Id: I1e5de2beaa33c9959f9889b03ef97e6509511007 --- diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 864ee9b..fe4f92f 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -4857,57 +4857,49 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta mo = ep->typedata.swallow->swallowed_object; } else mo = ep->object; - if (chosen_desc->map.on && ep->part->type != EDJE_PART_TYPE_SPACER) - { - static Evas_Map *map = NULL; - - ed->have_mapped_part = EINA_TRUE; - // create map and populate with part geometry - if (!map) map = evas_map_new(4); - _edje_map_prop_set(map, pf, chosen_desc, ep, mo); + Evas_Object *map_obj; - Evas_Object *map_obj; + /* Apply map to smart obj holding nested parts */ + if (ep->nested_smart) map_obj = ep->nested_smart; + else map_obj = mo; - /* Apply map to smart obj holding nested parts */ - if (ep->nested_smart) map_obj = ep->nested_smart; - else map_obj = mo; - if (map_obj) - { - eo_do(map_obj, - evas_obj_map_set(map), - evas_obj_map_enable_set(EINA_TRUE)); - } - } - else + if (ep->part->type != EDJE_PART_TYPE_SPACER) { - if ((ep->param1.p.mapped) || - ((ep->param2) && (ep->param2->p.mapped)) || - ((ep->custom) && (ep->custom->p.mapped))) + if (chosen_desc->map.on) { - if (ep->nested_smart) /* Cancel map of smart obj holding nested parts */ + static Evas_Map *map = NULL; + + ed->have_mapped_part = EINA_TRUE; + // create map and populate with part geometry + if (!map) map = evas_map_new(4); + + _edje_map_prop_set(map, pf, chosen_desc, ep, mo); + + if (map_obj) { - eo_do(ep->nested_smart, - evas_obj_map_enable_set(EINA_FALSE), - evas_obj_map_set(NULL)); + eo_do(map_obj, + evas_obj_map_set(map), + evas_obj_map_enable_set(EINA_TRUE)); } - else + } + else + { + Eina_Bool ret; + + if (map_obj && eo_do_ret(map_obj, ret, evas_obj_map_enable_get())) { #ifdef HAVE_EPHYSICS - if (!ep->body) + if (!ep->nested_smart && !ep->body) { #endif - if (mo) - eo_do(mo, - evas_obj_map_enable_set(0), - evas_obj_map_set(NULL)); -#ifdef HAVE_EPHYSICS + eo_do(map_obj, + evas_obj_map_enable_set(EINA_FALSE), + evas_obj_map_set(NULL)); } -#endif } } } - } if (map_colors_free) _map_colors_free(pf);