Skip to content

Commit

Permalink
Merge pull request lvgl#1339 from 3096/master
Browse files Browse the repository at this point in the history
lv_btnm fix bug don't toggle if inactive
  • Loading branch information
kisvegabor authored Jan 4, 2020
2 parents 479012e + e5e68ac commit 2c8ebb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lv_objx/lv_btnm.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
} else if(sign == LV_SIGNAL_RELEASED) {
if(ext->btn_id_pr != LV_BTNM_BTN_NONE) {
/*Toggle the button if enabled*/
if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr])) {
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])) {
ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_CTRL_TGL_STATE);
} else {
Expand Down

0 comments on commit 2c8ebb8

Please sign in to comment.