Merge pull request #4915 from Neradoc/fix-4193
Fix 4193 - set hidden_by_parent when adding to displayio group
This commit is contained in:
commit
57f898b774
|
@ -258,6 +258,8 @@ static void _add_layer(displayio_group_t *self, mp_obj_t layer) {
|
||||||
tilegrid->in_group = true;
|
tilegrid->in_group = true;
|
||||||
}
|
}
|
||||||
displayio_tilegrid_update_transform(tilegrid, &self->absolute_transform);
|
displayio_tilegrid_update_transform(tilegrid, &self->absolute_transform);
|
||||||
|
displayio_tilegrid_set_hidden_by_parent(
|
||||||
|
tilegrid, self->hidden || self->hidden_by_parent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
native_layer = mp_obj_cast_to_native_base(layer, &displayio_group_type);
|
native_layer = mp_obj_cast_to_native_base(layer, &displayio_group_type);
|
||||||
|
@ -269,6 +271,8 @@ static void _add_layer(displayio_group_t *self, mp_obj_t layer) {
|
||||||
group->in_group = true;
|
group->in_group = true;
|
||||||
}
|
}
|
||||||
displayio_group_update_transform(group, &self->absolute_transform);
|
displayio_group_update_transform(group, &self->absolute_transform);
|
||||||
|
displayio_group_set_hidden_by_parent(
|
||||||
|
group, self->hidden || self->hidden_by_parent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mp_raise_ValueError(translate("Layer must be a Group or TileGrid subclass."));
|
mp_raise_ValueError(translate("Layer must be a Group or TileGrid subclass."));
|
||||||
|
|
Loading…
Reference in New Issue