evas/textblock: check item's type before returning result.

Summary:
When format item is cut off by ellipsis, result of "_find_layout_item_line_match"
can be TEXT type item. And it keeps ellipsis item's information.
@fix

Test Plan: D974

Reviewers: woohyun, tasn

CC: cedric, herdsman

Differential Revision: https://phab.enlightenment.org/D975
This commit is contained in:
Youngbok Shin 2014-06-10 15:08:09 +01:00 committed by Tom Hacohen
parent ffda8635fe
commit f7cf96d4d9
1 changed files with 1 additions and 0 deletions

View File

@ -10321,6 +10321,7 @@ evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur,
if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
_find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it);
if (it && (it->type != EVAS_TEXTBLOCK_ITEM_FORMAT)) return EINA_FALSE;
fi = _ITEM_FORMAT(it);
if ((!ln) || (!fi)) return EINA_FALSE;
x = ln->x + fi->parent.x;