Evas textblock: Fixed an issue with item size calculation.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 16 Feb 2011 09:43:57 +0000 (09:43 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 16 Feb 2011 09:43:57 +0000 (09:43 +0000)
This caused some issues in some cases. Just switch continue with a goto to the end of the loop so we'll be able to calculate the sizes even when we don't need to format the format item.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@57081 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index a70a5bb..12d6bbf 100644 (file)
@@ -2206,7 +2206,7 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
         else
           {
              Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
-             if (!fi->formatme) continue;
+             if (!fi->formatme) goto loop_advance;
              fi->ascent = c->maxascent;
              fi->descent = c->maxdescent;
              /* Adjust sizes according to current line height/scale */
@@ -2305,6 +2305,7 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
                }
           }
 
+loop_advance:
         it->x = x;
         x += it->adv;