Mouse-click in the ipo/action/timeline/.. to change the frame
used to round down, and select the previous frame even when the mouse was very close to the next one. Now it snaps to the closest frame instead.
This commit is contained in:
@@ -4272,7 +4272,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &dx, &dy);
|
||||
|
||||
cfra= (int)dx;
|
||||
cfra= (int)(dx+0.5f);
|
||||
if (cfra < 1) cfra= 1;
|
||||
|
||||
if (cfra != CFRA) {
|
||||
|
||||
@@ -1936,7 +1936,7 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
|
||||
areamouseco_to_ipoco(G.v2d, mval, &dx, &dy);
|
||||
|
||||
cfra= (int)dx;
|
||||
cfra= (int)(dx+0.5f);
|
||||
if(cfra< 1) cfra= 1;
|
||||
|
||||
if( cfra!=CFRA ) {
|
||||
|
||||
@@ -143,7 +143,7 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &dx, &dy);
|
||||
|
||||
cfra = (int)dx;
|
||||
cfra = (int)(dx+0.5f);
|
||||
if(cfra< 1) cfra= 1;
|
||||
|
||||
if( cfra!=CFRA || first )
|
||||
|
||||
@@ -856,7 +856,7 @@ void winqreadtimespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &dx, &dy);
|
||||
|
||||
cfra = (int)dx;
|
||||
cfra = (int)(dx+0.5f);
|
||||
if(cfra< MINFRAME) cfra= MINFRAME;
|
||||
|
||||
if( cfra!=CFRA || first )
|
||||
|
||||
@@ -2837,7 +2837,7 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(v2d, mval, &dx, &dy);
|
||||
|
||||
cfra = get_cfra_from_dx(sipo, (int)dx);
|
||||
cfra = get_cfra_from_dx(sipo, (int)(dx+0.5f));
|
||||
if(cfra< 1) cfra= 1;
|
||||
|
||||
if( cfra!=CFRA ) {
|
||||
@@ -4644,7 +4644,7 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(v2d, mval, &dx, &dy);
|
||||
|
||||
cfra= (int)dx;
|
||||
cfra= (int)(dx+0.5f);
|
||||
if(cfra< 1) cfra= 1;
|
||||
/* else if(cfra> EFRA) cfra= EFRA; */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user