From 21365606d379e5cbb8cac8a6c0a1ba76438671ab Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 3 Jul 2023 10:34:42 +0300 Subject: [PATCH] [RTL] Fix multithreaded scrollbar visibility update 2. --- scene/gui/rich_text_label.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 63c9e7a6602..3675471f2df 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2928,6 +2928,7 @@ void RichTextLabel::_process_line_caches() { } } + total_height = (fi == 0) ? 0 : _calculate_line_vertical_offset(main->lines[fi - 1]); for (int i = fi; i < (int)main->lines.size(); i++) { total_height = _shape_line(main, i, theme_cache.normal_font, theme_cache.normal_font_size, text_rect.get_size().width - scroll_w, total_height, &total_chars); total_height = _update_scroll_exceeds(total_height, ctrl_height, text_rect.get_size().width - scroll_w, i, old_scroll, text_rect.size.height);