refactor(event): use lv_event_get_orignal_target instead of current_target
This commit is contained in:
@@ -1254,7 +1254,7 @@ static void calendar_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
lv_obj_t * ta = lv_event_get_user_data(e);
|
||||
lv_obj_t * obj = lv_event_get_current_target(e);
|
||||
lv_obj_t * obj = lv_event_get_target(e);
|
||||
if(code == LV_EVENT_VALUE_CHANGED) {
|
||||
lv_calendar_date_t d;
|
||||
lv_calendar_get_pressed_date(obj, &d);
|
||||
|
||||
@@ -1314,7 +1314,7 @@ def birthday_event_cb(e):
|
||||
def calendar_event_cb(e,ta) :
|
||||
global calendar
|
||||
code = e.get_code()
|
||||
obj = lv.calendar.__cast__(e.get_current_target())
|
||||
obj = lv.calendar.__cast__(e.get_target())
|
||||
if code == lv.EVENT.VALUE_CHANGED:
|
||||
d = lv.calendar_date_t()
|
||||
obj.get_pressed_date(d)
|
||||
|
||||
Reference in New Issue
Block a user