GPencil: Cleanup - Rename function for better naming

The old function name was not clear enough
This commit is contained in:
Antonio Vazquez 2016-08-08 11:26:00 +02:00
parent 31c34acff0
commit 444422120f
1 changed files with 5 additions and 5 deletions

View File

@ -2287,8 +2287,8 @@ static void gpencil_stroke_end(wmOperator *op)
p->gpf = NULL;
}
/* if drawing polygon and draw on back is enabled, move the stroke below all previous strokes */
static void gpencil_move_polygon_stroke_to_back(bContext *C)
/* Move last stroke in the listbase to the head to be drawn below all previous strokes in the layer */
static void gpencil_move_last_stroke_to_back(bContext *C)
{
/* move last stroke (the polygon) to head of the listbase stroke to draw on back of all previous strokes */
bGPdata *gpd = ED_gpencil_data_get_active(C);
@ -2368,7 +2368,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* if drawing polygon and enable on back, must move stroke */
if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
if (p->flags & GP_PAINTFLAG_STROKEADDED) {
gpencil_move_polygon_stroke_to_back(C);
gpencil_move_last_stroke_to_back(C);
}
}
p->status = GP_STATUS_DONE;
@ -2430,7 +2430,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* if drawing polygon and enable on back, must move stroke */
if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
if (p->flags & GP_PAINTFLAG_STROKEADDED) {
gpencil_move_polygon_stroke_to_back(C);
gpencil_move_last_stroke_to_back(C);
}
}
p->status = GP_STATUS_DONE;
@ -2516,7 +2516,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* if drawing polygon and enable on back, must move stroke */
if ((p->scene->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK) && (p->paintmode == GP_PAINTMODE_DRAW_POLY)) {
if (p->flags & GP_PAINTFLAG_STROKEADDED) {
gpencil_move_polygon_stroke_to_back(C);
gpencil_move_last_stroke_to_back(C);
}
}
p->status = GP_STATUS_DONE;