From c089f174ca615a920ec2245d01eeacb209354d98 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 15 Jan 2013 11:50:22 +0000 Subject: [PATCH] Evas obj text: Fix an issue with horiz_advance_get func. SVN revision: 82800 --- ChangeLog | 1 + NEWS | 1 + src/lib/evas/canvas/evas_object_text.c | 5 +---- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf20184..dcbafe9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2013-01-15 Tom Hacohen (TAsn) * Evas textblock: Fixed issue and simplified cursor_geometry_get. + * Evas text: Fixed issue with horiz advance. 2013-01-14 Daniel Willmann diff --git a/NEWS b/NEWS index ef11b21..5e94137 100644 --- a/NEWS +++ b/NEWS @@ -114,3 +114,4 @@ Fixes: * Evas textblock: Fixed issue with line height when breaking on a format. * Fix SIGFPE in evas map update if image is 0. * Evas textblock: Fixed issue and simplified cursor_geometry_get. + * Evas text: Fixed issue with horiz advance. diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 3bc185a..8ad304e 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -306,7 +306,7 @@ static Evas_Coord _evas_object_text_horiz_advance_get(const Evas_Object *eo_obj, const Evas_Object_Text *o) { - Evas_Object_Text_Item *it, *last_it = NULL; + Evas_Object_Text_Item *it; Evas_Coord adv; (void) eo_obj; @@ -314,11 +314,8 @@ _evas_object_text_horiz_advance_get(const Evas_Object *eo_obj, EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { adv += it->adv; - last_it = it; } - if (last_it && (last_it->w > last_it->adv)) - adv += last_it->w - last_it->adv; return adv; } -- 2.7.4