Merge pull request #72149 from MinusKube/rich_text_visible_chars_bug
Fix char offset calculation when processing RichTextLabel line caches
This commit is contained in:
commit
af1ef4c94f
1 changed files with 1 additions and 1 deletions
|
@ -2808,7 +2808,7 @@ void RichTextLabel::_process_line_caches() {
|
|||
|
||||
int ctrl_height = get_size().height;
|
||||
int fi = main->first_invalid_line.load();
|
||||
int total_chars = (fi == 0) ? 0 : (main->lines[fi].char_offset + main->lines[fi].char_count);
|
||||
int total_chars = main->lines[fi].char_offset;
|
||||
|
||||
float total_height = (fi == 0) ? 0 : _calculate_line_vertical_offset(main->lines[fi - 1]);
|
||||
for (int i = fi; i < (int)main->lines.size(); i++) {
|
||||
|
|
Loading…
Reference in a new issue