fix(choice): send LV_EVENT_VALUE_CHANGED after value has been set

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent 862073d4c2
commit fd3deb2571
+4 -2
View File
@@ -193,8 +193,10 @@ void Choice::setValues(const char * const values[])
void Choice::setValue(int val)
{
lv_event_send(lvobj, LV_EVENT_VALUE_CHANGED, nullptr);
if (_setValue) _setValue(val);
if (_setValue) {
_setValue(val);
lv_event_send(lvobj, LV_EVENT_VALUE_CHANGED, nullptr);
}
}
void Choice::onClicked()