Evas text: Fixed a bug in evas_object_text_char_pos_get - wrong X returned.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 12 Jul 2011 15:04:07 +0000 (15:04 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 12 Jul 2011 15:04:07 +0000 (15:04 +0000)
 Happens when using multiple scripts in the same text object.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61300 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_text.c

index c65b4aa..d78d8b4 100644 (file)
@@ -110,8 +110,11 @@ _evas_object_text_char_coords_get(const Evas_Object *obj,
         if ((it->text_pos <= pos) &&
               (pos < (it->text_pos + it->text_props.text_len)))
           {
-             return ENFN->font_char_coords_get(ENDT, o->font,
+             int ret;
+             ret = ENFN->font_char_coords_get(ENDT, o->font,
                    &it->text_props, pos - it->text_pos, x, y, w, h);
+             if (x) *x += it->x;
+             return ret;
           }
      }
    return 0;