diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-01-28 14:05:41 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-02-09 07:10:48 +0300 |
commit | 117d90b3da4201fb2df64ad44e823b29a0f8569b (patch) | |
tree | c6c81935c1ad0cca91d293bb9eb368b58ed9bc45 /source/blender/editors | |
parent | b16fd220184a9172073440ed35e0eae0a15635d0 (diff) |
Fix: GPencil delete operators did not respect color locking
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 5b011b679a6..e118e490f25 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -953,6 +953,9 @@ static int gp_dissolve_selected_points(bContext *C) /* skip strokes that are invalid for current view */ if (ED_gpencil_stroke_can_use(C, gps) == false) continue; + /* check if the color is editable */ + if (ED_gpencil_stroke_color_use(gpl, gps) == false) + continue; if (gps->flag & GP_STROKE_SELECT) { bGPDspoint *pt; @@ -1165,6 +1168,9 @@ static int gp_delete_selected_points(bContext *C) /* skip strokes that are invalid for current view */ if (ED_gpencil_stroke_can_use(C, gps) == false) continue; + /* check if the color is editable */ + if (ED_gpencil_stroke_color_use(gpl, gps) == false) + continue; if (gps->flag & GP_STROKE_SELECT) { @@ -1204,7 +1210,7 @@ static int gp_delete_exec(bContext *C, wmOperator *op) case GP_DELETEOP_POINTS: /* selected points (breaks the stroke into segments) */ result = gp_delete_selected_points(C); break; - + case GP_DELETEOP_FRAME: /* active frame */ result = gp_actframe_delete_exec(C, op); break; |