Evas textblock: Fixed order of tags inserted with markup_app/prepend.
authorTom Hacohen <tom@stosb.com>
Tue, 19 Nov 2013 16:03:41 +0000 (16:03 +0000)
committerTom Hacohen <tom@stosb.com>
Tue, 19 Nov 2013 16:05:34 +0000 (16:05 +0000)
The order was messed up when inserting a few formats in the
markup_append/prepend functions without any characters between them.
For example, inserting "<b><i>" would result in "<i><b>" being inserted.

Thanks to YoungBok Shin for reporting this.

ChangeLog
NEWS
src/lib/evas/canvas/evas_object_textblock.c

index ec9d038..3dc7c28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-19  Tom Hacohen
+
+       * Evas textblock: Fixed order of tags inserted with markup_app/prepend.
+
 2013-11-05  Youngbok Shin
 
         * Edje: Add null checking for name of anchor and item in geometry get functions.
diff --git a/NEWS b/NEWS
index e24caaa..6a1f8bd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -360,7 +360,7 @@ Fixes:
      - Fixed the map surface to be updated properly. By tranversing the whole of the map target's tree, it decides to update the map surface to be redrawn if one of the objects is changed except the clipper itself.
      - Fixed the textblock format to be drawn according to the glyph's horizontal advance width.
      - Fixed the textblock set to context with the textblock object's render operation.
-
+     - Evas textblock: Fixed order of tags inserted with markup_app/prepend.
     * Ecore:
      - Don't leak fd on exec.
      - Fix fd handler increase issue when ecore_pipe_add/del is called repeatedly.
index 4194aac..64a2ac2 100644 (file)
@@ -8578,6 +8578,7 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
           }
         else
           {
+             fmt = _evas_textblock_node_format_last_at_off(fmt);
              if (evas_textblock_cursor_format_is_visible_get(cur))
                {
                   o->format_nodes = _NODE_FORMAT(eina_inlist_prepend_relative(
@@ -8593,7 +8594,6 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
                }
              else
                {
-                  fmt = _evas_textblock_node_format_last_at_off(fmt);
                   o->format_nodes = _NODE_FORMAT(eina_inlist_append_relative(
                            EINA_INLIST_GET(o->format_nodes),
                            EINA_INLIST_GET(n),