summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorjmb462 <jmb462@gmail.com>2021-03-16 10:08:31 +0100
committerjmb462 <jmb462@gmail.com>2021-03-16 10:45:16 +0100
commit25af026d9e2037ae9953a7868ed2f4c906925675 (patch)
tree9ca2516482007d72c8c327ae4ff05f85862c2b24 /scene
parent245cfcaba63da9be8a566eed220746d9bb39f522 (diff)
Fix BBCode tables overlap with bottom text
New row height was added only if all the column was full.
Diffstat (limited to 'scene')
-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;