bugfix #24573
authorTon Roosendaal <ton@blender.org>
Wed, 10 Nov 2010 16:22:19 +0000 (16:22 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 10 Nov 2010 16:22:19 +0000 (16:22 +0000)
View2d custom keymap to put zoom in RMB didn't work, the modal handler
still has a hardcoded check for mouse/keys. Fixed it for this case quickly,
added wiki todo and warning in code.

source/blender/editors/interface/view2d_ops.c

index 5500d9aae8da430a680a1274ade5d7dc061d5021..f59e7ddda4b9b7e724b360e24010477e7dac7a44 100644 (file)
@@ -1002,7 +1002,8 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
                
                /* apply zooming */
                view_zoomdrag_apply(C, op);
-       } else if (ELEM(event->type, LEFTMOUSE, MIDDLEMOUSE)) {
+       } 
+       else if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE)) { /* XXX needs modal keymap */
                if (event->val==KM_RELEASE) {
                        /* for redo, store the overall deltas - need to respect zoom-locks here... */
                        if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0)