diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-19 15:23:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 15:23:13 +0100 |
commit | 82efb1d262aea24b5f742820017fd11c496c3f8c (patch) | |
tree | 0d941a1ff5b4273b4b2d0e106b8a02d7f070f69f | |
parent | 2d1080e430e98078f7301c8160578f89202d72ee (diff) | |
parent | 42c79161c26b1465cd83840978c09dd5bb46a5b4 (diff) |
Merge pull request #53923 from KoBeWi/RichBugLabel
-rw-r--r-- | scene/gui/rich_text_label.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 669bdab637..b50fad0e42 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2197,10 +2197,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<Font> base_font = get_theme_font(SNAME("normal_font")); @@ -2221,7 +2217,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; @@ -2232,10 +2228,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<Font> base_font = get_theme_font(SNAME("normal_font")); @@ -2258,7 +2250,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; |