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>2009-09-24 14:35:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-24 14:35:04 +0400
commitf16d2b7eaac2f9225075d85e3d570e437407d513 (patch)
treea8ca1ee5957ce793e40c2ca8381549778ee1d359 /source/blender/editors/space_image
parent71027be7f60bf55b8961c06f33a579cdef0f5cd8 (diff)
fix for middle mouse up events not working with modal keymaps (used for fly mode).
With mouse events event->val started as 0/1 for press/release but later the tweak function made LMB and RMB zero value into KM_RELEASE, somehow MMB didnt get used by the tweak function so was left at 0 and the modal keymap function failed when comparing MMB Mouse ups. now initialize event->val as KM_PRESS/KM_RELEASE
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 483d2fc6043..317a058d20e 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -224,7 +224,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
view_pan_exec(C, op);
break;
case MIDDLEMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -339,7 +339,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
ED_area_tag_redraw(CTX_wm_area(C));
break;
case MIDDLEMOUSE:
- if(event->val==0) {
+ if(event->val==KM_RELEASE) {
view_zoom_exit(C, op, 0);
return OPERATOR_FINISHED;
}