Evas textblock: Fixed a couple of cases where a geometry of a visible format item would have been returned although it shouldn't have.
SVN revision: 56420
This commit is contained in:
parent
81616cec5d
commit
4aaa8df5fe
|
@ -7193,15 +7193,14 @@ _evas_textblock_cursor_range_in_line_geometry_get(
|
|||
/* IMPORTANT: Don't use cur1/cur2 past this point (because of bidi),
|
||||
* unless you are know what you are doing */
|
||||
|
||||
/* Special case when they share the same item. */
|
||||
if (it1 == it2)
|
||||
/* Special case when they share the same item and it's a text item */
|
||||
if ((it1 == it2) && (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT))
|
||||
{
|
||||
Evas_Coord x1, w1, x2, w2;
|
||||
Evas_Coord x, w, y, h;
|
||||
if (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT)
|
||||
{
|
||||
Evas_Object_Textblock_Text_Item *ti;
|
||||
int ret;
|
||||
|
||||
ti = _ITEM_TEXT(it1);
|
||||
ret = cur->ENFN->font_char_coords_get(cur->ENDT,
|
||||
ti->format->font.font,
|
||||
|
@ -7247,12 +7246,6 @@ _evas_textblock_cursor_range_in_line_geometry_get(
|
|||
x = x1;
|
||||
w = x2 - x1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
w = it1->w;
|
||||
}
|
||||
if (w > 0)
|
||||
{
|
||||
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
|
||||
|
@ -7263,7 +7256,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
|
|||
tr->w = w;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (it1 != it2)
|
||||
{
|
||||
/* Get the middle items */
|
||||
Evas_Coord min_x, max_x;
|
||||
|
@ -7348,8 +7341,17 @@ _evas_textblock_cursor_range_in_line_geometry_get(
|
|||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: This should be here for rtl, items, this can't be achieved
|
||||
* yet, there are stuff to do before. ask Tom (TAsn) what's needed
|
||||
* to be done in order to get that right to rtl as well if you
|
||||
* are interested. - If you see this message please let me Tom (TAsn)
|
||||
* know, because I should have fixed it immediately. */
|
||||
#if 0
|
||||
x = 0;
|
||||
w = it2->w;
|
||||
#else
|
||||
w = 0; /* Disable this item for the moment */
|
||||
#endif
|
||||
}
|
||||
if (w > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue