From d47cd1d7fe910efc189e2f43f046a09184cfff13 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 7 Dec 2021 15:38:01 +0100 Subject: [PATCH] fix(btnmatrix): keep the selected button even on release fixes: #2858 --- src/core/lv_indev.c | 2 +- src/widgets/lv_btnmatrix.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/lv_indev.c b/src/core/lv_indev.c index 2bed6a8bd..473badca4 100644 --- a/src/core/lv_indev.c +++ b/src/core/lv_indev.c @@ -349,7 +349,7 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x); if(data->point.y < 0) LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y); - if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) LV_LOG_WARN("Y is %d which is greater than hor. res", + if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) LV_LOG_WARN("Y is %d which is greater than ver. res", data->point.y); /*Move the cursor if set and moved*/ diff --git a/src/widgets/lv_btnmatrix.c b/src/widgets/lv_btnmatrix.c index 05adfde3d..9ef0ec33f 100644 --- a/src/widgets/lv_btnmatrix.c +++ b/src/widgets/lv_btnmatrix.c @@ -506,10 +506,6 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e) /*Invalidate to old pressed area*/; invalidate_button_area(obj, btnm->btn_id_sel); - lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); - if(indev_type == LV_INDEV_TYPE_POINTER || indev_type == LV_INDEV_TYPE_BUTTON) { - btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE; - } } else if(code == LV_EVENT_LONG_PRESSED_REPEAT) { if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) {