From 58c454372cf490b63e0ab662d82a2c27b9d5ccc7 Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 29 Aug 2010 12:16:32 +0000 Subject: [PATCH] Evas textblock: fixed breakages of paragraph direction when merging/splitting text nodes. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@51723 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 7d2fd1a..786b597 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -4065,6 +4065,12 @@ _evas_textblock_nodes_merge(Evas_Object_Textblock *o, Evas_Object_Textblock_Node text = eina_ustrbuf_string_get(from->unicode); len = eina_ustrbuf_length_get(from->unicode); eina_ustrbuf_append_length(to->unicode, text, len); +#ifdef BIDI_SUPPORT + /* Reset paragraph direction */ + to->bidi_props.direction = EVAS_BIDI_PARAGRAPH_NATURAL; + evas_bidi_update_props(eina_ustrbuf_string_get(to->unicode), + &to->bidi_props); +#endif itr = from->format_node; if (itr && (itr->text_node == from)) @@ -5578,6 +5584,15 @@ _evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur, len = eina_ustrbuf_length_get(cur->node->unicode) - start; eina_ustrbuf_append_length(n->unicode, text + start, len); eina_ustrbuf_remove(cur->node->unicode, start, start + len); +#ifdef BIDI_SUPPORT + /* Reset paragraph direction */ + n->bidi_props.direction = EVAS_BIDI_PARAGRAPH_NATURAL; + evas_bidi_update_props(eina_ustrbuf_string_get(n->unicode), + &n->bidi_props); + cur->node->bidi_props.direction = EVAS_BIDI_PARAGRAPH_NATURAL; + evas_bidi_update_props(eina_ustrbuf_string_get(cur->node->unicode), + &cur->node->bidi_props); +#endif } else { -- 2.7.4