- Two fixes:
authorTon Roosendaal <ton@blender.org>
Fri, 29 Oct 2004 17:21:28 +0000 (17:21 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 29 Oct 2004 17:21:28 +0000 (17:21 +0000)
1) Sound window displays 'frs/sec' value correct now (found a 25 hardcoded)

2) LeftMouse click in sliders of IpoWind, NLA, Action allows to make
sliders smaller/larger, for quick zoom. Used to work but disappeared in
early this decade or so :)

source/blender/src/drawsound.c
source/blender/src/editaction.c
source/blender/src/editnla.c
source/blender/src/space.c

index 77ad7eb6efc89f219c9b755eb365f97e568f16e7..d08f5d0ee0e47b7989c28fee39f67304eff70cea 100644 (file)
@@ -103,7 +103,7 @@ static void draw_sample(bSample *sample)
        short *sp, sampdx;
        
        /* one sample is where in v2d space? (v2d space in frames!) */
-       sampfac= 25.0/(sample->rate);
+       sampfac= ((float)G.scene->r.frs_sec)/(sample->rate);
 
        /* how many samples? */
        samples= sample->len/(sample->channels*(sample->bits/8));
index 06bade5365da315f3ee4a1836049e64aadd440dc..a809586e98f2b20902b878bb9edf034663ae5b88 100644 (file)
@@ -2441,7 +2441,8 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                 * based on user preference USER_LMOUSESELECT
                 */
                case LEFTMOUSE:
-                       if (mval[0]>ACTWIDTH){
+                       if(view2dmove(LEFTMOUSE)); // only checks for sliders
+                       else if (mval[0]>ACTWIDTH){
                                do {
                                        getmouseco_areawin(mval);
                                        
index cbea6a107c4e6f53e9e91d6c19396bf29a7c22b7..9838cb68ec2b283fa58f1686ec0f3d6942015d07 100644 (file)
@@ -291,7 +291,8 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                 * based on user preference USER_LMOUSESELECT
                 */
                case LEFTMOUSE:
-                       if (mval[0]>NLAWIDTH){
+                       if(view2dmove(LEFTMOUSE)); // only checks for sliders
+                       else if (mval[0]>NLAWIDTH){
                                do {
                                        getmouseco_areawin(mval);
                                        
index d22a024871da688ebc0fb7bcef178a916e565fca..29a607582949d76d136763b1de21363720b6a962 100644 (file)
@@ -1792,7 +1792,8 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                        if( in_ipo_buttons() ) {
                                do_ipo_selectbuttons();
                                doredraw= 1;
-                       }                       
+                       }
+                       else if(view2dmove(LEFTMOUSE)); // only checks for sliders
                        else if(G.qual & LR_CTRLKEY) add_vert_ipo();
                        else {
                                do {