From 42c79161c26b1465cd83840978c09dd5bb46a5b4 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 19 Jan 2022 14:26:31 +0100 Subject: [PATCH] Fix bottom line in editor log --- scene/gui/rich_text_label.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 4588966d884..dec23a0f1c3 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2145,10 +2145,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) { } // Resize lines without reshaping. - Size2 size = get_size(); - if (fixed_width != -1) { - size.width = fixed_width; - } Rect2 text_rect = _get_text_rect(); Ref base_font = get_theme_font(SNAME("normal_font")); @@ -2169,7 +2165,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) { vscroll->set_max(total_height); vscroll->set_page(text_rect.size.height); if (scroll_follow && scroll_following) { - vscroll->set_value(total_height - size.height); + vscroll->set_value(total_height); } updating_scroll = false; @@ -2180,10 +2176,6 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) { } // Shape invalid lines. - Size2 size = get_size(); - if (fixed_width != -1) { - size.width = fixed_width; - } Rect2 text_rect = _get_text_rect(); Ref base_font = get_theme_font(SNAME("normal_font")); @@ -2206,7 +2198,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame *p_frame) { vscroll->set_max(total_height); vscroll->set_page(text_rect.size.height); if (scroll_follow && scroll_following) { - vscroll->set_value(total_height - size.height); + vscroll->set_value(total_height); } updating_scroll = false;