Fix Alt key conflict in Annotation Eraser

There was a conflict when the Alt key was pressed while drawing and this makes eraser very difficult.
This commit is contained in:
Antonio Vazquez 2018-11-30 10:58:12 +01:00
parent a8c884c3ba
commit ba4d920ab5
Notes: blender-bot 2023-02-14 05:44:22 +01:00
Referenced by issue #58214, Annotations in any editor are hard to erase
1 changed files with 1 additions and 1 deletions

View File

@ -1759,7 +1759,7 @@ static void gpencil_draw_apply_event(wmOperator *op, const wmEvent *event, Depsg
}
/* check if alt key is pressed and limit to straight lines */
if (p->straight[0] != 0) {
if ((p->paintmode != GP_PAINTMODE_ERASER) && (p->straight[0] != 0)) {
if (p->straight[0] == 1) {
/* horizontal */
p->mval[1] = p->straight[1]; /* replace y */