diff --git a/ChangeLog b/ChangeLog index bf20184112..dcbafe9fff 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 ef11b2160b..5e941372bb 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 3bc185a2da..8ad304e707 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; }