diff --git a/src/widgets/lv_checkbox.c b/src/widgets/lv_checkbox.c index 2128f2d13..59b6b0e4c 100644 --- a/src/widgets/lv_checkbox.c +++ b/src/widgets/lv_checkbox.c @@ -156,10 +156,7 @@ static void lv_checkbox_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); - if(code == LV_EVENT_PRESSED || code == LV_EVENT_RELEASED) { - lv_obj_invalidate(obj); - } - else if(code == LV_EVENT_GET_SELF_SIZE) { + if(code == LV_EVENT_GET_SELF_SIZE) { lv_point_t * p = lv_event_get_param(e); lv_checkbox_t * cb = (lv_checkbox_t *)obj; @@ -188,13 +185,6 @@ static void lv_checkbox_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_coord_t m = lv_obj_calculate_ext_draw_size(obj, LV_PART_INDICATOR); *s = LV_MAX(*s, m); } - else if(code == LV_EVENT_RELEASED) { - uint32_t v = lv_obj_get_state(obj) & LV_STATE_CHECKED ? 1 : 0; - res = lv_event_send(obj, LV_EVENT_VALUE_CHANGED, &v); - if(res != LV_RES_OK) return; - - lv_obj_invalidate(obj); - } else if(code == LV_EVENT_DRAW_MAIN) { lv_checkbox_draw(e); }