Commit: dff8a7db733f1f810e868e9dffc1088017e879d0
Author: Campbell Barton
Date:   Fri Jun 8 10:52:49 2018 +0200
Branches: master
https://developer.blender.org/rBdff8a7db733f1f810e868e9dffc1088017e879d0

Fix regression in grease pencil drawing

Drag events finished drawing early.

===================================================================

M       source/blender/editors/gpencil/gpencil_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index af140501069..ece1b74d8dd 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2489,7 +2489,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator 
*op, const wmEvent *event)
         *    (Disabling RIGHTMOUSE case here results in bugs like [#32647])
         * also making sure we have a valid event value, to not exit too early
         */
-       if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (event->val != 
KM_NOTHING)) {
+       if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, 
KM_PRESS, KM_RELEASE))) {
                /* if painting, end stroke */
                if (p->status == GP_STATUS_PAINTING) {
                        int sketch = 0;
@@ -2635,7 +2635,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator 
*op, const wmEvent *event)
                                estate = OPERATOR_FINISHED;
                        }
                }
-               else {
+               else if (event->val == KM_RELEASE) {
                        p->status = GP_STATUS_IDLING;
                        op->flag |= OP_IS_MODAL_CURSOR_REGION;
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to