Evas textblock: Fixed issue with char/line_coord_set with valign. #2.

After adding some tests, I found out that my previous fix was not enough.

SVN revision: 61362
This commit is contained in:
Tom Hacohen 2011-07-14 08:00:23 +00:00
parent 9615dc0226
commit 1128519838
1 changed files with 4 additions and 4 deletions

View File

@ -7685,14 +7685,14 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
}
}
}
else if (y > o->formatted.h)
else if (o->paragraphs && (y > o->paragraphs->y + o->formatted.h))
{
/* If we are after the last paragraph, use the last position in the
* text. */
evas_textblock_cursor_paragraph_last(cur);
return EINA_TRUE;
}
else if ((y < 0) || (o->paragraphs && (y < o->paragraphs->y)))
else if (o->paragraphs && (y < o->paragraphs->y))
{
evas_textblock_cursor_paragraph_first(cur);
return EINA_TRUE;
@ -7729,7 +7729,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
}
}
}
else if (y > o->formatted.h)
else if (o->paragraphs && (y > o->paragraphs->y + o->formatted.h))
{
int line_no = 0;
/* If we are after the last paragraph, use the last position in the
@ -7746,7 +7746,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
}
return line_no;
}
else if ((y < 0) || (o->paragraphs && (y < o->paragraphs->y)))
else if (o->paragraphs && (y < o->paragraphs->y))
{
int line_no = 0;
evas_textblock_cursor_paragraph_first(cur);