Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-13 02:52:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-13 02:52:16 +0400
commit156047263e44f088e700554e34dd3f66fded75fe (patch)
tree85c9924c816f24c4a2b9f0ab87056b9cde3f69c7 /source/blender/editors
parent1c32617f1e587a878a881012f7850aa6d72394d1 (diff)
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.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index b1945c37048..e10d70d48d1 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1444,18 +1444,22 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
}
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 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
/* 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)) {