Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BBCode tables overlap with bottom text (Fix #47012) #47050

Conversation

jmb462
Copy link
Contributor

@jmb462 jmb462 commented Mar 16, 2021

Fix #47012

Issue :

In RichTextLabel, text after a [table] element overlaps with table last row if the last row doesn't use all columns.

Before :

before

Fix proposal :

The height of the row was only added if column == col_count - 1 => if all the columns was used.
I've added an other condition : (column == col_count - 1 || E->next() == nullptr) => if all the columns was used OR if it's the last element of the table (even if it's not on the last column).

After :

after

@jmb462 jmb462 requested a review from a team as a code owner March 16, 2021 09:22
@akien-mga akien-mga added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:gui labels Mar 16, 2021
@akien-mga akien-mga added this to the 4.0 milestone Mar 16, 2021
New row height was added only if all the column was full.
@jmb462 jmb462 force-pushed the fix-bbcode-tables-overlap-with-bottom-text branch from 7b4b5dc to 25af026 Compare March 16, 2021 09:51
@akien-mga akien-mga merged commit e57f6e2 into godotengine:master Mar 17, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 17, 2021
@akien-mga
Copy link
Member

This will need a dedicated PR for the 3.x branch as the code changed a lot in master, and can't be cherry-picked.

@jmb462
Copy link
Contributor Author

jmb462 commented Mar 17, 2021

@akien-mga Seems that it will be exactly the same fix at line 825 in 3.2 branch.

if (column == table->columns.size() - 1) ====> if (column == table->columns.size() - 1 || E->next() == nullptr)

Does it really deserve a new PR for cherrypicking ? (If so, I can do it)

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 17, 2021
@akien-mga
Copy link
Member

Thanks, I'll do it then :)

@akien-mga
Copy link
Member

Cherry-picked for 3.3.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BBCode Tables overlap with bottom text
2 participants