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

Fixes the get_visible_line_count() of rich text label #40217

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

theoway
Copy link
Contributor

@theoway theoway commented Jul 8, 2020

Fixes #18722

Bug: get_visible_line_count() would return wrong values.

Reason: While being drawn, visible_line_count was getting wrong values from _process_line(). Actually, _process_line() return wrong number of nonblank_line_count. This was messing up the visible_line_count.

Fix: Every time a line is drawn, visible_line_count is simply incremented, instead of getting wrong values from _process_line()

Before Fix

Screenshot (96)
Screenshot (98)

After Fix

Screenshot (92)
Screenshot (93)
Screenshot (95)

@KoBeWi KoBeWi added this to the 4.0 milestone Jul 8, 2020
@akien-mga akien-mga merged commit 1ab0644 into godotengine:master Jul 22, 2020
@akien-mga
Copy link
Member

Thanks!

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

Cherry-picked for 3.2.3.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 24, 2020
@theoway theoway deleted the visible_line_count_fix branch July 30, 2020 21:03
@akien-mga
Copy link
Member

Reverted the cherry-pick for now until we figure out the #40982 regression.

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 17, 2020
@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jun 3, 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.

RichText: get_visible_line_count() returns wrong value
3 participants