mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(slider): do not let edit left knob in non-range mode
This commit is contained in:
parent
d6d5903be1
commit
5e8581a345
@ -392,9 +392,13 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par
|
||||
lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
|
||||
if(indev_type == LV_INDEV_TYPE_ENCODER) {
|
||||
if(editing) {
|
||||
if(ext->right_knob_focus == 0) ext->right_knob_focus = 1;
|
||||
else {
|
||||
ext->right_knob_focus = 0;
|
||||
if(lv_slider_get_type(slider) == LV_SLIDER_TYPE_RANGE) {
|
||||
if(ext->right_knob_focus == 0) ext->right_knob_focus = 1;
|
||||
else {
|
||||
ext->right_knob_focus = 0;
|
||||
lv_group_set_editing(g, false);
|
||||
}
|
||||
} else {
|
||||
lv_group_set_editing(g, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user