Skip to content

Commit

Permalink
Fix typo in row height definition
Browse files Browse the repository at this point in the history
Using last cell's position works too, but it's much cleaner to use row's
position.

Fix #983.
  • Loading branch information
liZe committed Nov 7, 2019
1 parent a160bdc commit cebc1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weasyprint/layout/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def group_layout(group, position_y, max_position_y,
else:
row.height = max(row.height, max(
row_cell.height for row_cell in ending_cells))
row_bottom_y = cell.position_y + row.height
row_bottom_y = row.position_y + row.height
else:
row_bottom_y = row.position_y
row.height = 0
Expand Down

2 comments on commit cebc1ba

@Tontyna
Copy link
Contributor

@Tontyna Tontyna commented on cebc1ba Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about

cell.position_y + cell.border_height()

@liZe
Copy link
Member Author

@liZe liZe commented on cebc1ba Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK, it's in a "for" loop, that's what we want.

Please sign in to comment.