From a10f726fc5540196e9ac64fe5e1aa2951904910a Mon Sep 17 00:00:00 2001 From: Daniel Hirt Date: Thu, 29 Jun 2017 13:57:54 +0300 Subject: [PATCH] Evas textblock: re-apply paragraph position inference For some reason, c39855a8ac6f86c2dd8b1856ed70f85e0e521f3e also seems to address an issue with height calculations (although not mentioned in the commit message). It already went in v1.19, so by applying b8beb6834b01f9688cb5e7aa177bacbc713318b9 I also reverted that behavior. Seems like a correct one, so re-applying. Fixes T5594 --- src/lib/evas/canvas/evas_object_textblock.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index c64f3007f6..a85cef5646 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5493,8 +5493,16 @@ _layout_par(Ctxt *c) /* After this par we are no longer at the beginning, as there * must be some text in the par. */ - if (c->position == TEXTBLOCK_POSITION_START) - c->position = TEXTBLOCK_POSITION_ELSE; + if (!EINA_INLIST_GET(c->par)->next) + { + c->position = (c->position == TEXTBLOCK_POSITION_START) ? + TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END; + } + else + { + if (c->position == TEXTBLOCK_POSITION_START) + c->position = TEXTBLOCK_POSITION_ELSE; + } if (c->par->last_fw > c->wmax) c->wmax = c->par->last_fw; return 0;