From b0145a15d2fa508029ef6c5010968544eca3acd0 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 3 Apr 2019 19:13:27 +0800 Subject: [PATCH] CalcLayoutBoundingRect --- src/newgdi/layoutinfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/newgdi/layoutinfo.c b/src/newgdi/layoutinfo.c index 3afd43cc..60a9e602 100644 --- a/src/newgdi/layoutinfo.c +++ b/src/newgdi/layoutinfo.c @@ -2312,7 +2312,12 @@ int GUIAPI CalcLayoutBoundingRect(LAYOUTINFO* layout, } GetLayoutLineRect(line, &x, &y, line_height, &line_rc); - GetBoundRect(bounding, bounding, &line_rc); + if (IsRectEmpty(bounding)) { + CopyRect(bounding, &line_rc); + } + else { + GetBoundRect(bounding, bounding, &line_rc); + } nr_lines++; } while (1);