Evas textblock: Fix wrong behavior when updating style.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 Feb 2011 08:43:30 +0000 (08:43 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 Feb 2011 08:43:30 +0000 (08:43 +0000)
When updating style we should not clear the utf8 text but we should relayout.
And definitely not reset it.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@57294 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index c601dda..4cb39e6 100644 (file)
@@ -3897,11 +3897,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
         Evas_Object_Textblock *o;
 
         o = (Evas_Object_Textblock *)(obj->object_data);
-        if (o->markup_text)
-          {
-             free(o->markup_text);
-             o->markup_text = NULL;
-          }
+        _evas_textblock_text_node_changed(o, obj, NULL);
      }
 
    _style_clear(ts);
@@ -3992,24 +3988,6 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
              p++;
           }
      }
-
-   EINA_LIST_FOREACH(ts->objects, l, obj)
-     {
-        Evas_Object_Textblock *o;
-
-        o = (Evas_Object_Textblock *)(obj->object_data);
-        if (o->markup_text)
-          {
-             char *m;
-
-             m = strdup(o->markup_text);
-             if (m)
-               {
-                  evas_object_textblock_text_markup_set(obj, m);
-                  free(m);
-               }
-          }
-     }
 }
 
 /**