BigW Consortium Gitlab

Commit cab6ce93 by Josh McAtee

Fix ddlist controlled via keyboard

The selected option is tracked correctly when scrolling through the dropdown list via keyboard
parent aad9f76a
......@@ -515,7 +515,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) {
if(ext->sel_opt_id + 1 < ext->option_cnt) {
ext->sel_opt_id ++;
lv_obj_invalidate(ddlist);
lv_ddlist_pos_current_option(ddlist);
if(ext->action != NULL) {
ext->action(ddlist);
}
......@@ -523,7 +523,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
} else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) {
if(ext->sel_opt_id > 0) {
ext->sel_opt_id --;
lv_obj_invalidate(ddlist);
lv_ddlist_pos_current_option(ddlist);
if(ext->action != NULL) {
ext->action(ddlist);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment