Skip to content

Commit

Permalink
fix(chart) fix sending LV_EVENT_DRAW_PART_BEGIN/END for the cursor
Browse files Browse the repository at this point in the history
kisvegabor committed Jul 19, 2021
1 parent c386110 commit 34b8cd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/extra/widgets/chart/lv_chart.c
Original file line number Diff line number Diff line change
@@ -1297,6 +1297,8 @@ static void draw_cursors(lv_obj_t * obj, const lv_area_t * clip_area)

lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
lv_draw_line(&p1, &p2, &clip_area2, &line_dsc_tmp);
lv_draw_rect(&point_area, &clip_area2, &point_dsc_tmp);
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}

if(cursor->dir & LV_DIR_VER) {
@@ -1307,10 +1309,10 @@ static void draw_cursors(lv_obj_t * obj, const lv_area_t * clip_area)

lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
lv_draw_line(&p1, &p2, &clip_area2, &line_dsc_tmp);
lv_draw_rect(&point_area, &clip_area2, &point_dsc_tmp);
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}

lv_draw_rect(&point_area, &clip_area2, &point_dsc_tmp);
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}
}

0 comments on commit 34b8cd9

Please sign in to comment.