Evas textblock: Use the saved paragraph pointer instead of searching.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 19 May 2011 09:54:19 +0000 (09:54 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 19 May 2011 09:54:19 +0000 (09:54 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59526 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 7b4525f..26125bf 100644 (file)
@@ -4029,20 +4029,14 @@ _relayout(const Evas_Object *obj)
 static void
 _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr)
 {
-   Evas_Object_Textblock_Paragraph *par, *found_par = NULL;
+   Evas_Object_Textblock_Paragraph *found_par;
    Evas_Object_Textblock_Line *ln;
    Evas_Object_Textblock *o;
 
    o = (Evas_Object_Textblock *)(obj->object_data);
    if (!o->formatted.valid) _relayout(obj);
-   EINA_INLIST_FOREACH(o->paragraphs, par)
-     {
-        if (par->text_node == n)
-          {
-             found_par = par;
-             break;
-          }
-     }
+
+   found_par = n->par;
    if (found_par)
      {
         EINA_INLIST_FOREACH(found_par->lines, ln)