use draw protocol impl in parent hidden too
This commit is contained in:
parent
b6a5f421a9
commit
1c564764d6
@ -32,9 +32,6 @@
|
||||
|
||||
#if CIRCUITPY_VECTORIO
|
||||
#include "shared-bindings/vectorio/VectorShape.h"
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
#endif
|
||||
|
||||
|
||||
@ -104,22 +101,10 @@ void displayio_group_set_hidden_by_parent(displayio_group_t *self, bool hidden)
|
||||
continue;
|
||||
}
|
||||
#if CIRCUITPY_VECTORIO
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &vectorio_circle_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
common_hal_vectorio_vector_shape_set_dirty(common_hal_vectorio_circle_get_draw_protocol(layer));
|
||||
continue;
|
||||
}
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &vectorio_rectangle_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
common_hal_vectorio_vector_shape_set_dirty(common_hal_vectorio_rectangle_get_draw_protocol(layer));
|
||||
continue;
|
||||
}
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &vectorio_polygon_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
common_hal_vectorio_vector_shape_set_dirty(common_hal_vectorio_polygon_get_draw_protocol(layer));
|
||||
const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]);
|
||||
if (draw_protocol != NULL) {
|
||||
layer = draw_protocol->draw_get_protocol_self(self->members->items[i]);
|
||||
draw_protocol->draw_protocol_impl->draw_set_dirty(layer);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user