Browse Source

Fix BBCode tables overlap with bottom text

New row height was added only if all the column was full.

(cherry picked from commit 25af026d9e2037ae9953a7868ed2f4c906925675)
jmb462 4 years ago
parent
commit
843eb80039
1 changed files with 2 additions and 1 deletions
  1. 2 1
      scene/gui/rich_text_label.cpp

+ 2 - 1
scene/gui/rich_text_label.cpp

@@ -822,7 +822,8 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
 					row_height = MAX(yofs, row_height);
 					row_height = MAX(yofs, row_height);
 					offset.x += table->columns[column].width + hseparation;
 					offset.x += table->columns[column].width + hseparation;
 
 
-					if (column == table->columns.size() - 1) {
+					// Add row height after last column of the row or last cell of the table.
+					if (column == table->columns.size() - 1 || E->next() == NULL) {
 
 
 						offset.y += row_height + vseparation;
 						offset.y += row_height + vseparation;
 						offset.x = hseparation;
 						offset.x = hseparation;