From db2ac385a9122f8b1839a6e6cd350ee94431044a Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Wed, 21 May 2025 00:42:40 -0300 Subject: [PATCH] move height resets to finish region internal --- crates/typst-layout/src/grid/layouter.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/typst-layout/src/grid/layouter.rs b/crates/typst-layout/src/grid/layouter.rs index 9f714ac86..d4682a9da 100644 --- a/crates/typst-layout/src/grid/layouter.rs +++ b/crates/typst-layout/src/grid/layouter.rs @@ -1747,11 +1747,6 @@ impl<'a> GridLayouter<'a> { ); if !last { - self.current.repeated_header_rows = 0; - self.current.last_repeated_header_end = 0; - self.current.repeating_header_height = Abs::zero(); - self.current.repeating_header_heights.clear(); - let disambiguator = self.finished.len(); if let Some(footer) = self.grid.footer.as_ref().and_then(Repeatable::as_repeated) @@ -1795,6 +1790,11 @@ impl<'a> GridLayouter<'a> { self.current.could_progress_at_top = self.regions.may_progress(); + self.current.repeated_header_rows = 0; + self.current.last_repeated_header_end = 0; + self.current.repeating_header_height = Abs::zero(); + self.current.repeating_header_heights.clear(); + if !self.grid.headers.is_empty() { self.finished_header_rows.push(header_row_info); }