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.
This commit is contained in:
Antonio Vazquez 2020-03-26 10:19:16 +01:00
parent e8dd96516c
commit c547d431eb
Notes: blender-bot 2023-02-14 00:09:06 +01:00
Referenced by issue #75093, GPencil: The box-erase tool deletes vertices outside the selected area
1 changed files with 2 additions and 2 deletions

View File

@ -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);