Skip to content

Commit

Permalink
Fix RichTextLabel table overlapping with next line
Browse files Browse the repository at this point in the history
When calculating table height, RichTextLabel::_shape_line would increase the height when it reached the end of a complete row, or the final cell of the table.  RichTextLabel::_resize_line would only increase the height at the end of a complete row, causing the height to ignore the final row if not all cells were populated.  This would cause the final row to overlap with the following line in the RichTextLabel if it was the last visible line in the RichTextLabel, as _resize_line is called when updating scrolling properties.

This change moves the common table size calculations to a separate function to reuse the code between _shape_line and _resize_line, keeping the final cell check that was used in _shape_line.

Fixes #92603
  • Loading branch information
aaronp64 committed May 31, 2024
1 parent 705b7a0 commit 6ecccd6
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 242 deletions.
Loading

0 comments on commit 6ecccd6

Please sign in to comment.