Skip to content

Commit 49c5811

Browse files
authored
Relayout text on changes to LineHeight (#21779)
# Objective `LineHeight` was removed from `TextFont` and made into a component, but change detection on the `LineHeight` component to trigger a relayout wasn't added. ## Solution Add `Changed<LineHeight>` query filters to `detect_text_needs_rerender`.
1 parent 5f7994e commit 49c5811

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_text/src/text.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ pub fn detect_text_needs_rerender<Root: Component>(
674674
Changed<Root>,
675675
Changed<TextFont>,
676676
Changed<TextLayout>,
677+
Changed<LineHeight>,
677678
Changed<Children>,
678679
)>,
679680
With<Root>,
@@ -687,6 +688,7 @@ pub fn detect_text_needs_rerender<Root: Component>(
687688
Or<(
688689
Changed<TextSpan>,
689690
Changed<TextFont>,
691+
Changed<LineHeight>,
690692
Changed<Children>,
691693
Changed<ChildOf>, // Included to detect broken text block hierarchies.
692694
Added<TextLayout>,

0 commit comments

Comments
 (0)