edje: Move prev_description out of ephysics ifdef

prev_description was used when HAVE_EPHYSICS is set, which is the
default, but I also added a use in 7072fbc2bf where the map
was not properly reset.

This removes an ugly #ifdef and opens the door to other fixes
similar to that map one.
This commit is contained in:
Jean-Philippe Andre 2017-03-14 14:06:24 +09:00
parent fbe72f6e4b
commit 3103c551f5
3 changed files with 3 additions and 8 deletions

View File

@ -5450,8 +5450,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (map_colors_free) _map_colors_free(pf);
#ifdef HAVE_EPHYSICS
ep->prev_description = chosen_desc;
#ifdef HAVE_EPHYSICS
if (!ep->body)
{
#endif
@ -5461,7 +5461,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
ep->h = pf->final.h;
#ifdef HAVE_EPHYSICS
}
#endif
ep->calculated |= flags;

View File

@ -2009,8 +2009,8 @@ struct _Edje_Real_Part
// WITH EDJE_CALC_CACHE: 307
Edje_Running_Program *program; // 4
Edje_Calc_Params *current; // 4
#ifdef HAVE_EPHYSICS
Edje_Part_Description_Common *prev_description; // 4
#ifdef HAVE_EPHYSICS
EPhysics_Body *body; // 4
Eina_List *body_faces; // 4
#endif

View File

@ -6280,11 +6280,7 @@ _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part *rp)
(!rp->typedata.swallow)) return;
if (!rp->typedata.swallow->swallowed_object) return;
if (rp->chosen_description->map.on ||
(rp->invalidate
#ifdef HAVE_EPHYSICS
&& rp->prev_description && rp->prev_description->map.on
#endif
))
(rp->invalidate && rp->prev_description && rp->prev_description->map.on))
{
evas_object_map_enable_set(rp->typedata.swallow->swallowed_object, EINA_FALSE);
}