aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-14 14:06:24 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-14 14:15:09 +0900
commit3103c551f5e7622e47c4f4ea27a9012f86b8f127 (patch)
tree7922e4794f08c8d8346cc893ac3858bf63c034c1
parentgenlist: Fix some more decorate mode issues (diff)
downloadefl-3103c551f5e7622e47c4f4ea27a9012f86b8f127.tar.gz
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 7072fbc2bfe25881 where the map was not properly reset. This removes an ugly #ifdef and opens the door to other fixes similar to that map one.
-rw-r--r--src/lib/edje/edje_calc.c3
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/edje/edje_util.c6
3 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 5bb2fbb50a..6f5e08c17d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -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;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 11243a5459..a849f3034f 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -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
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 3ea970ce3c..b819cc2eca 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -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);
}