Replace checks for empty uinodes (#17520)

# Objective

The `is_empty` checks that are meant to stop zero-sized uinodes from
being extracted are missing from `extract_uinode_background_colors`,
`extract_uinode_images` and `extract_ui_material_nodes`.

## Solution

Put them back.
This commit is contained in:
ickshonpe 2025-01-24 05:38:20 +00:00 committed by GitHub
parent 81a25bb0c7
commit e459dd94ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -307,7 +307,10 @@ pub fn extract_uinode_background_colors(
};
// Skip invisible backgrounds
if !inherited_visibility.get() || background_color.0.is_fully_transparent() {
if !inherited_visibility.get()
|| background_color.0.is_fully_transparent()
|| uinode.is_empty()
{
continue;
}
@ -372,6 +375,7 @@ pub fn extract_uinode_images(
|| image.color.is_fully_transparent()
|| image.image.id() == TRANSPARENT_IMAGE_HANDLE.id()
|| image.image_mode.uses_slices()
|| uinode.is_empty()
{
continue;
}

View File

@ -392,7 +392,7 @@ pub fn extract_ui_material_nodes<M: UiMaterial>(
};
// skip invisible nodes
if !inherited_visibility.get() {
if !inherited_visibility.get() || uinode.is_empty() {
continue;
}