[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52157] trunk/blender/source/blender/ editors/uvedit/uvedit_smart_stitch.c: uv stitch was executing on Enter-key release, making it not work when starting from operator search popup ( pressing enter), also Plus/ Minus keys would get incremented for key press and release.

Campbell Barton ideasman42 at gmail.com
Mon Nov 12 23:52:23 CET 2012


Revision: 52157
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52157
Author:   campbellbarton
Date:     2012-11-12 22:52:16 +0000 (Mon, 12 Nov 2012)
Log Message:
-----------
uv stitch was executing on Enter-key release, making it not work when starting from operator search popup (pressing enter), also Plus/Minus keys would get incremented for key press and release.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-11-12 21:44:48 UTC (rev 52156)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-11-12 22:52:16 UTC (rev 52157)
@@ -1444,18 +1444,22 @@
 			}
 		case PADENTER:
 		case RETKEY:
-			if (stitch_process_data(stitch_state, scene, 1)) {
-				stitch_exit(C, op, 1);
-				return OPERATOR_FINISHED;
+			if (event->val == KM_PRESS) {
+				if (stitch_process_data(stitch_state, scene, 1)) {
+					stitch_exit(C, op, 1);
+					return OPERATOR_FINISHED;
+				}
+				else {
+					return stitch_cancel(C, op);
+				}
 			}
 			else {
-				return stitch_cancel(C, op);
+				return OPERATOR_PASS_THROUGH;
 			}
-
 		/* Increase limit */
 		case PADPLUSKEY:
 		case WHEELUPMOUSE:
-			if (event->alt) {
+			if (event->val == KM_PRESS && event->alt) {
 				stitch_state->limit_dist += 0.01f;
 				if (!stitch_process_data(stitch_state, scene, 0)) {
 					return stitch_cancel(C, op);
@@ -1468,7 +1472,7 @@
 		/* Decrease limit */
 		case PADMINUS:
 		case WHEELDOWNMOUSE:
-			if (event->alt) {
+			if (event->val == KM_PRESS && event->alt) {
 				stitch_state->limit_dist -= 0.01f;
 				stitch_state->limit_dist = MAX2(0.01f, stitch_state->limit_dist);
 				if (!stitch_process_data(stitch_state, scene, 0)) {




More information about the Bf-blender-cvs mailing list