summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-17 17:54:01 +0100
committerGitHub <noreply@github.com>2021-03-17 17:54:01 +0100
commite57f6e2cca90d4c9e956fe1a7ddb3ca086521b42 (patch)
tree73463e1677c29f2b94c84460b6d5668c8ffc274f
parent3150ef3427c5647b16e5d62ee465cdda745dfb98 (diff)
parent25af026d9e2037ae9953a7868ed2f4c906925675 (diff)
Merge pull request #47050 from jmb462/fix-bbcode-tables-overlap-with-bottom-text
Fix BBCode tables overlap with bottom text (Fix #47012)
-rw-r--r--scene/gui/rich_text_label.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 1933bc8af0..bce30e7cd3 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -588,7 +588,8 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
offset.x += table->columns[column].width + hseparation + frame->padding.size.x;
row_height = MAX(yofs, row_height);
- if (column == col_count - 1) {
+ // Add row height after last column of the row or last cell of the table.
+ if (column == col_count - 1 || E->next() == nullptr) {
offset.x = 0;
row_height += vseparation;
table->total_height += row_height;