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 duplicated row after line break #60

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

ralfstx
Copy link
Member

@ralfstx ralfstx commented Sep 28, 2023

During the layout of a rows block, when there was not enough space left on a page for another row, the layout of that row would return an empty frame with a remainder that contained the entire row. When even this empty frame (height: 0) did not fit onto the old page because its margin would exceed the max height, a page break would have been inserted before that frame. However, the remainder would still be prepended to the next page, resulting in a duplication of the row.

This commit fixes this bug by only prepending the remainder to the next page when the frame that accompanied this remainder is actually included in the old page, i.e. the page break is inserted after that frame.

During the layout of a rows block, when there was not enough space left
on a page for another row, the layout of that row would return an empty
frame with a remainder that contained the entire row. When even this
empty frame (`height: 0`) did not fit onto the old page because its
margin would exceed the max height, a page break would have been
inserted _before_ that frame. However, the remainder would still be
prepended to the next page, resulting in a duplication of the row.

This commit fixes this bug by only prepending the remainder to the next
page when the frame that accompanied this remainder is actually included
in the old page, i.e. the page break is inserted _after_ that frame.
@ralfstx ralfstx merged commit 1b62f22 into main Sep 28, 2023
1 check passed
@ralfstx ralfstx deleted the mr-fix-double-row branch September 28, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant