From 81114d0202aaec571b5f5a7a200fdb62baf192a5 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 9 Feb 2025 11:28:29 -0600 Subject: [PATCH] set pointSize, underline, font, before calculate_layout early return --- src/dialogxml/widgets/message.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dialogxml/widgets/message.cpp b/src/dialogxml/widgets/message.cpp index 61874918..60f8f0f0 100644 --- a/src/dialogxml/widgets/message.cpp +++ b/src/dialogxml/widgets/message.cpp @@ -130,14 +130,13 @@ void cTextMsg::calculate_layout() { } void cTextMsg::recalcRect() { + style.pointSize = textSize; + style.underline = underlined; + style.font = textFont; if(fixedWidth && fixedHeight){ calculate_layout(); return; } - TextStyle style; - style.font = textFont; - style.pointSize = textSize; - style.underline = underlined; style.lineHeight = textSize + 2; std::string test = getText(); size_t lines = 1, cur_line_chars = 0, max_line_chars = 0;