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:
parent
81a25bb0c7
commit
e459dd94ec
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user