Skip to content

Commit 3fb4e3f

Browse files
committed
Keep section_index in Glyph to maintain support for MarkdownLabel
1 parent 618edd3 commit 3fb4e3f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

crates/epaint/src/text/text_layout.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,11 @@ fn galley_from_rows(
666666
num_indices += row.visuals.mesh.indices.len();
667667

668668
row.section_index_at_start = u32::MAX; // No longer in use.
669-
for glyph in &mut row.glyphs {
670-
glyph.section_index = u32::MAX; // No longer in use.
671-
}
669+
670+
// MEMBRANE: Keep these values since we use them to render Markdown
671+
// for glyph in &mut row.glyphs {
672+
// glyph.section_index = u32::MAX; // No longer in use.
673+
// }
672674
}
673675

674676
let mut galley = Galley {

crates/epaint/src/text/text_layout_types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,8 @@ pub struct Glyph {
700700
/// Only used during layout, then set to an invalid value in order to
701701
/// enable the paragraph-concat optimization path without having to
702702
/// adjust `section_index` when concatting.
703-
pub(crate) section_index: u32,
703+
/// MEMBRANE: Keep these values since we use them to render Markdown
704+
pub section_index: u32,
704705
}
705706

706707
impl Glyph {

0 commit comments

Comments
 (0)