mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(example) fix artifacts when the fist point is clicked in lv_example_chart_4
This commit is contained in:
parent
973c36b514
commit
8155712687
@ -18,7 +18,7 @@ static void event_cb(lv_event_t * e)
|
|||||||
int32_t id = lv_chart_get_pressed_point(chart);
|
int32_t id = lv_chart_get_pressed_point(chart);
|
||||||
if(id == LV_CHART_POINT_NONE) return;
|
if(id == LV_CHART_POINT_NONE) return;
|
||||||
|
|
||||||
LV_LOG_USER("Selected point %d\n", id);
|
LV_LOG_USER("Selected point %d", id);
|
||||||
|
|
||||||
lv_chart_series_t * ser = lv_chart_get_series_next(chart, NULL);
|
lv_chart_series_t * ser = lv_chart_get_series_next(chart, NULL);
|
||||||
while(ser) {
|
while(ser) {
|
||||||
@ -51,6 +51,9 @@ static void event_cb(lv_event_t * e)
|
|||||||
ser = lv_chart_get_series_next(chart, ser);
|
ser = lv_chart_get_series_next(chart, ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(code == LV_EVENT_RELEASED) {
|
||||||
|
lv_obj_invalidate(chart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user