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:
authorTon Roosendaal <ton@blender.org>2004-11-01 15:42:03 +0300
committerTon Roosendaal <ton@blender.org>2004-11-01 15:42:03 +0300
commit275c5e7ee346b1629b11d1eaa96550323ccb990a (patch)
treed7ee74ef98aaa7439de013d669411438054dcf80
parent84b3980b92ca308192e20f6c6b94b4c4fced08e5 (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!
-rw-r--r--source/blender/src/drawipo.c15
-rw-r--r--source/blender/src/editaction.c10
-rw-r--r--source/blender/src/editnla.c17
3 files changed, 35 insertions, 7 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);
}
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index a809586e98f..d01528cc04c 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -2521,6 +2521,16 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
}
break;
+ case PADPLUSKEY:
+ view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
+ test_view2d(G.v2d, sa->winx, sa->winy);
+ doredraw= 1;
+ break;
+ case PADMINUS:
+ view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
+ test_view2d(G.v2d, sa->winx, sa->winy);
+ doredraw= 1;
+ break;
case MIDDLEMOUSE:
case WHEELUPMOUSE:
case WHEELDOWNMOUSE:
diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c
index 9838cb68ec2..1a4c776f5f7 100644
--- a/source/blender/src/editnla.c
+++ b/source/blender/src/editnla.c
@@ -218,11 +218,13 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
do_nla_buttons(B_NLAHOME);
break;
- case PADMINUS:
+ case EQUALKEY:
+ case PAGEUPKEY:
shift_nlastrips_up();
break;
- case PADPLUSKEY:
+ case MINUSKEY:
+ case PAGEDOWNKEY:
shift_nlastrips_down();
break;
@@ -321,6 +323,17 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else
mouse_nlachannels(mval);
break;
+
+ case PADPLUSKEY:
+ view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
+ test_view2d(G.v2d, sa->winx, sa->winy);
+ doredraw= 1;
+ break;
+ case PADMINUS:
+ view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
+ test_view2d(G.v2d, sa->winx, sa->winy);
+ doredraw= 1;
+ break;
case MIDDLEMOUSE:
case WHEELUPMOUSE:
case WHEELDOWNMOUSE: