Evas textblock: fixed breakages of paragraph direction when merging/splitting text...
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 Aug 2010 12:16:32 +0000 (12:16 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 Aug 2010 12:16:32 +0000 (12:16 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51723 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 7d2fd1a..786b597 100644 (file)
@@ -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
      {