浏览代码

Merge pull request #47050 from jmb462/fix-bbcode-tables-overlap-with-bottom-text

Fix BBCode tables overlap with bottom text (Fix #47012)
Rémi Verschelde 4 年之前
父节点
当前提交
e57f6e2cca
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scene/gui/rich_text_label.cpp

+ 2 - 1
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;