mirror of
https://github.com/typst/typst
synced 2025-07-02 02:02:53 +08:00
use different disambiguators when skipping region
This commit is contained in:
parent
ce41113d9c
commit
3361b3714d
@ -202,7 +202,7 @@ impl<'a> GridLayouter<'a> {
|
|||||||
) -> SourceResult<()> {
|
) -> SourceResult<()> {
|
||||||
// Generate different locations for content in headers across its
|
// Generate different locations for content in headers across its
|
||||||
// repetitions by assigning a unique number for each one.
|
// repetitions by assigning a unique number for each one.
|
||||||
let disambiguator = self.finished.len();
|
let mut disambiguator = self.finished.len();
|
||||||
|
|
||||||
// At first, only consider the height of the given headers. However,
|
// At first, only consider the height of the given headers. However,
|
||||||
// for upcoming regions, we will have to consider repeating headers as
|
// for upcoming regions, we will have to consider repeating headers as
|
||||||
@ -254,6 +254,9 @@ impl<'a> GridLayouter<'a> {
|
|||||||
// if 'full'changes? (Assuming height doesn't change for now...)
|
// if 'full'changes? (Assuming height doesn't change for now...)
|
||||||
if !skipped_region {
|
if !skipped_region {
|
||||||
if let HeadersToLayout::NewHeaders { headers, .. } = headers {
|
if let HeadersToLayout::NewHeaders { headers, .. } = headers {
|
||||||
|
// Update disambiguator as we are re-measuring headers
|
||||||
|
// which were already laid out.
|
||||||
|
disambiguator = self.finished.len();
|
||||||
header_height =
|
header_height =
|
||||||
// Laying out new headers, so we have to consider the
|
// Laying out new headers, so we have to consider the
|
||||||
// combined height of already repeating headers as well
|
// combined height of already repeating headers as well
|
||||||
|
Loading…
x
Reference in New Issue
Block a user