diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-01 15:42:03 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-01 15:42:03 +0300 |
commit | 275c5e7ee346b1629b11d1eaa96550323ccb990a (patch) | |
tree | d7ee74ef98aaa7439de013d669411438054dcf80 /source/blender/src/drawipo.c | |
parent | 84b3980b92ca308192e20f6c6b94b4c4fced08e5 (diff) |
Fix for #1722
Reported was that padplus/padminus doesn't do a zoom in the NLA or Action
windows. Was missing since very beginning! :)
Found conflict with the new NLA strip move up/down, but using the pad
keys for that is a bit too inconsistant. I've now made it using the
PageUp/PageDown and normal plus/minus keys... Hos could check on this
though!
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r-- | source/blender/src/drawipo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index d7fb1195974..292aa6979ac 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -361,13 +361,18 @@ int in_ipo_buttons(void) } -void view2d_zoom(View2D *v2d, float factor, int winx, int winy) { +void view2d_zoom(View2D *v2d, float factor, int winx, int winy) +{ float dx= factor*(v2d->cur.xmax-v2d->cur.xmin); float dy= factor*(v2d->cur.ymax-v2d->cur.ymin); - v2d->cur.xmin+= dx; - v2d->cur.xmax-= dx; - v2d->cur.ymin+= dy; - v2d->cur.ymax-= dy; + if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { + v2d->cur.xmin+= dx; + v2d->cur.xmax-= dx; + } + if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { + v2d->cur.ymin+= dy; + v2d->cur.ymax-= dy; + } test_view2d(v2d, winx, winy); } |