summaryrefslogtreecommitdiff
path: root/library/src/layout/grid.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-06-12 17:20:49 +0200
committerLaurenz <laurmaedje@gmail.com>2023-06-12 17:20:54 +0200
commit6720d8c3017af787b8dce42e9fa15468f281629d (patch)
treeb1bf66865e304251e9760e11912fded8b6f2e16d /library/src/layout/grid.rs
parentd3b4d7da9a801dac3af6a3cf52eb55af83adc5f5 (diff)
Fix bug with missing table row
Fixes #1388
Diffstat (limited to 'library/src/layout/grid.rs')
-rw-r--r--library/src/layout/grid.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/src/layout/grid.rs b/library/src/layout/grid.rs
index ea155acd..acf13d64 100644
--- a/library/src/layout/grid.rs
+++ b/library/src/layout/grid.rs
@@ -293,7 +293,7 @@ impl<'a, 'v> GridLayouter<'a, 'v> {
for y in 0..self.rows.len() {
// Skip to next region if current one is full, but only for content
// rows, not for gutter rows.
- if y % 2 == 0 && self.regions.is_full() {
+ if self.regions.is_full() && (!self.has_gutter || y % 2 == 0) {
self.finish_region()?;
}
@@ -547,7 +547,7 @@ impl<'a, 'v> GridLayouter<'a, 'v> {
self.finish_region()?;
// Don't skip multiple regions for gutter and don't push a row.
- if y % 2 == 1 {
+ if self.has_gutter && y % 2 == 1 {
return Ok(());
}
}