fix VectorShape on_dirty callback registration being set for the wrong type

This commit is contained in:
warriorofwire 2020-05-11 21:21:05 -07:00
parent 040beb0577
commit 78444a1018

View File

@ -85,8 +85,8 @@ STATIC mp_obj_t vectorio_vector_shape_make_new(const mp_obj_type_t *type, size_t
if (MP_OBJ_IS_TYPE(shape, &vectorio_polygon_type)) {
common_hal_vectorio_polygon_set_on_dirty(self->ishape.shape, on_dirty);
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_rectangle_type)) {
common_hal_vectorio_circle_set_on_dirty(self->ishape.shape, on_dirty);
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_circle_type)) {
common_hal_vectorio_circle_set_on_dirty(self->ishape.shape, on_dirty);
} else {
mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_shape);
}