[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39235] trunk/blender/source/blender/ editors/gpencil/gpencil_paint.c: fix [#28197] Undoing Grease pencil removes last 2 strokes

Campbell Barton ideasman42 at gmail.com
Tue Aug 9 22:33:35 CEST 2011


Revision: 39235
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39235
Author:   campbellbarton
Date:     2011-08-09 20:33:35 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
fix [#28197] Undoing Grease pencil removes last 2 strokes

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-08-09 20:14:32 UTC (rev 39234)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2011-08-09 20:33:35 UTC (rev 39235)
@@ -1722,7 +1722,7 @@
 		/* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */
 		// FIXME: this is a hardcoded hotkey that can't be changed
 		// TODO: catch redo as well, but how?
-		if (event->type == ZKEY) {
+		if (event->type == ZKEY && event->val == KM_RELEASE) {
 			/* oskey = cmd key on macs as they seem to use cmd-z for undo as well? */
 			if ((event->ctrl) || (event->oskey)) {
 				/* just delete last stroke, which will look like undo to the end user */




More information about the Bf-blender-cvs mailing list