Evas obj text: Fix an issue with horiz_advance_get func.
authorTom Hacohen <tom@stosb.com>
Tue, 15 Jan 2013 11:50:22 +0000 (11:50 +0000)
committerTom Hacohen <tom@stosb.com>
Tue, 15 Jan 2013 11:50:22 +0000 (11:50 +0000)
SVN revision: 82800

ChangeLog
NEWS
src/lib/evas/canvas/evas_object_text.c

index bf20184..dcbafe9 100644 (file)
--- 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 (file)
--- 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.
index 3bc185a..8ad304e 100644 (file)
@@ -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;
 }