1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge pull request #1726 from upbeat27/lv_btnmatrix_set_one_check_fix

Fix `lv_btnmatrix_set_one_check` not forcing one button to be checked
This commit is contained in:
Gabor Kiss-Vamosi 2020-08-17 09:11:12 +02:00 committed by GitHub
commit 4af6c62146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@
- Fix crash if `lv_table_set_col_cnt` is called before `lv_table_set_row_cnt` for the first time
- Fix overflow in large image transformations
- Limit extra button click area of button matrix's buttons. With large paddings it was counter intuitive. (Gaps are mapped to button when clicked).
- Fix `lv_btnmatrix_set_one_check` not forcing exactly one button to be checked
## v7.3.0 (04.08.2020)

View File

@ -918,7 +918,7 @@ static lv_res_t lv_btnmatrix_signal(lv_obj_t * btnm, lv_signal_t sign, void * pa
/*Toggle the button if enabled*/
if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr]) &&
!button_is_inactive(ext->ctrl_bits[ext->btn_id_pr])) {
if(button_get_tgl_state(ext->ctrl_bits[ext->btn_id_pr])) {
if(button_get_tgl_state(ext->ctrl_bits[ext->btn_id_pr]) && !ext->one_check) {
ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNMATRIX_CTRL_CHECK_STATE);
}
else {