From 25af026d9e2037ae9953a7868ed2f4c906925675 Mon Sep 17 00:00:00 2001 From: jmb462 Date: Tue, 16 Mar 2021 10:08:31 +0100 Subject: [PATCH] Fix BBCode tables overlap with bottom text New row height was added only if all the column was full. --- scene/gui/rich_text_label.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 1933bc8af08..bce30e7cd35 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 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;