Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-03-26 12:19:16 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-26 12:19:16 +0300
commitc547d431eb87a78132af434e114eff82a70ba8c6 (patch)
treecbddd10bcdef6ef2e2f038ccc1623ca44d86f64d /source/blender/editors/gpencil
parente8dd96516c60c4c43c8eb217f2c2cc61761cd0a0 (diff)
Fix T75093: GPencil eraser selection in draw mode erase previous selected points
The selection in Draw mode works as a quick eraser and must erase only the points selected in that operation and not any previous selected point. Now, before erase, unselect any previous selected point. Note: It's planned to split select & erase operators for Draw mode.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 6194b82fed9..03e8001341f 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -1164,7 +1164,7 @@ static int gpencil_generic_select_exec(bContext *C,
gp_point_conversion_init(C, &gsc);
/* deselect all strokes first? */
- if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
+ if (SEL_OP_USE_PRE_DESELECT(sel_op) || (GPENCIL_PAINT_MODE(gpd))) {
CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
bGPDspoint *pt;
@@ -1248,7 +1248,7 @@ static int gpencil_generic_select_exec(bContext *C,
GP_EVALUATED_STROKES_END(gpstroke_iter);
/* if paint mode,delete selected points */
- if (gpd->flag & GP_DATA_STROKE_PAINTMODE) {
+ if (GPENCIL_PAINT_MODE(gpd)) {
gp_delete_selected_point_wrap(C);
changed = true;
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);