Fix T44259: Secondary strokes get terminated early when drawing in Continuous Drawing mode

This commit is contained in:
Julian Eisel 2015-04-04 14:27:05 +02:00
parent f5949efb53
commit 59df941ea5
Notes: blender-bot 2023-02-14 09:16:49 +01:00
Referenced by issue #44268, Particles: too many virtual parents + non-100 display% = crash
Referenced by issue #44259, Grease Pencil: Secondary strokes get terminated early when drawing in Continuous Drawing mode
1 changed files with 2 additions and 1 deletions

View File

@ -1885,8 +1885,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
* - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only)
* - RIGHTMOUSE = polyline (hotkey) / eraser (all)
* (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)) {
if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && event->val != 0) {
/* if painting, end stroke */
if (p->status == GP_STATUS_PAINTING) {
int sketch = 0;