diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 4e521b5909c..3afdd5772fc 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2367,7 +2367,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* printf("\t\tGP - end of paint op + end of stroke\n"); */ /* 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)) { - gpencil_move_polygon_stroke_to_back(C); + if (p->flags & GP_PAINTFLAG_STROKEADDED) { + gpencil_move_polygon_stroke_to_back(C); + } } p->status = GP_STATUS_DONE; estate = OPERATOR_FINISHED; @@ -2427,7 +2429,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) /* printf("\t\tGP - end of stroke + op\n"); */ /* 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)) { - gpencil_move_polygon_stroke_to_back(C); + if (p->flags & GP_PAINTFLAG_STROKEADDED) { + gpencil_move_polygon_stroke_to_back(C); + } } p->status = GP_STATUS_DONE; estate = OPERATOR_FINISHED; @@ -2511,7 +2515,9 @@ 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)) { - gpencil_move_polygon_stroke_to_back(C); + if (p->flags & GP_PAINTFLAG_STROKEADDED) { + gpencil_move_polygon_stroke_to_back(C); + } } p->status = GP_STATUS_DONE; estate = OPERATOR_FINISHED; |