mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-04-19 12:57:19 +00:00
Fix dropdown redraw bugs
This commit is contained in:
parent
99879441d5
commit
66c456a1d1
@ -1128,6 +1128,7 @@ static hasp_attribute_type_t specific_options_attribute(lv_obj_t* obj, const cha
|
||||
case LV_HASP_DROPDOWN:
|
||||
if(update) {
|
||||
lv_dropdown_set_options(obj, payload);
|
||||
lv_obj_invalidate(obj); // otherwise it won't refresh
|
||||
} else {
|
||||
*text = (char*)lv_dropdown_get_options(obj);
|
||||
}
|
||||
@ -1396,7 +1397,11 @@ static hasp_attribute_type_t attribute_common_val(lv_obj_t* obj, int32_t& val, b
|
||||
break;
|
||||
|
||||
case LV_HASP_DROPDOWN:
|
||||
lv_dropdown_set_selected(obj, (uint16_t)val);
|
||||
if(update)
|
||||
lv_dropdown_set_selected(obj, (uint16_t)val);
|
||||
else
|
||||
val = lv_dropdown_get_selected(obj);
|
||||
break;
|
||||
|
||||
case LV_HASP_LINEMETER:
|
||||
if(update)
|
||||
|
Loading…
x
Reference in New Issue
Block a user