[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34306] trunk/blender/source/blender/ editors/gpencil/gpencil_paint.c: Bugfix [#25620] Grease Pencil: crash when using Ctrl+Z while drawing

Joshua Leung aligorith at gmail.com
Thu Jan 13 23:59:50 CET 2011


Revision: 34306
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34306
Author:   aligorith
Date:     2011-01-13 22:59:48 +0000 (Thu, 13 Jan 2011)
Log Message:
-----------
Bugfix [#25620] Grease Pencil: crash when using Ctrl+Z while drawing

Crazy users! Who on earth would try undoing in the middle of an action
(here the crash occurred while a mouse button was still held)?!

(At least it wouldn't have been possible for those using the DKEY +
mousedrag method of invoking strokes though...)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/gpencil/gpencil_paint.c

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2011-01-13 22:44:47 UTC (rev 34305)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2011-01-13 22:59:48 UTC (rev 34306)
@@ -1636,6 +1636,13 @@
 				estate = OPERATOR_RUNNING_MODAL;
 			}
 		}
+		/* there shouldn't be any other events, but just in case there are, let's swallow them 
+		 * (i.e. to prevent problems with with undo)
+		 */
+		else {
+			/* swallow event to save ourselves trouble */
+			estate = OPERATOR_RUNNING_MODAL;
+		}
 	}
 	else if (p->status == GP_STATUS_IDLING) {
 		/* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */




More information about the Bf-blender-cvs mailing list