Fix bottom line in editor log

This commit is contained in:
kobewi 2022-01-19 14:26:31 +01:00
parent 468b987aa3
commit 42c79161c2

View File

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