diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-22 09:50:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 09:50:26 +0200 |
commit | 1ab0644532521443d0594549da432d89b9d535a4 (patch) | |
tree | f0c6ec1d329a611e3bdabae9617d3b5623370a6d /scene/gui | |
parent | d8c3fba1d4061e7f13c130b1ce14490b13364e12 (diff) | |
parent | bd32c273ff4e2357e1fd7a8613241332252623e9 (diff) |
Merge pull request #40217 from theoway/visible_line_count_fix
Fixes the get_visible_line_count() of rich text label
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 8d7bccf814..572be8d901 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1020,7 +1020,8 @@ void RichTextLabel::_notification(int p_what) { visible_line_count = 0; while (y < size.height && from_line < main->lines.size()) { - visible_line_count += _process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, font_color_shadow, use_outline, shadow_ofs, Point2i(), nullptr, nullptr, nullptr, total_chars); + visible_line_count++; + _process_line(main, text_rect.get_position(), y, text_rect.get_size().width - scroll_w, from_line, PROCESS_DRAW, base_font, base_color, font_color_shadow, use_outline, shadow_ofs, Point2i(), nullptr, nullptr, nullptr, total_chars); total_chars += main->lines[from_line].char_count; from_line++; |