Fix T57866: Annotation not working using Search and Enter key

Thanks to @mano-wii for the fix
This commit is contained in:
Antonio Vazquez 2020-02-04 12:39:44 +01:00
parent 3dde6360ff
commit e35dab4895

@ -2098,7 +2098,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
* NOTE: cannot do RIGHTMOUSE (as is standard for canceling)
* as that would break polyline T32647.
*/
if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) {
if (event->val == KM_PRESS && ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) {
/* exit() ends the current stroke before cleaning up */
/* printf("\t\tGP - end of paint op + end of stroke\n"); */
p->status = GP_STATUS_DONE;