Jelajahi Sumber

Fix BBCode tables overlap with bottom text

New row height was added only if all the column was full.
jmb462 4 tahun lalu
induk
melakukan
25af026d9e
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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;
 					offset.x += table->columns[column].width + hseparation + frame->padding.size.x;
 
 
 					row_height = MAX(yofs, row_height);
 					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;
 						offset.x = 0;
 						row_height += vseparation;
 						row_height += vseparation;
 						table->total_height += row_height;
 						table->total_height += row_height;