Merge pull request #53923 from KoBeWi/RichBugLabel

This commit is contained in:
Rémi Verschelde 2022-01-19 15:23:13 +01:00 committed by GitHub
commit 82efb1d262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -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;