View2D - Bugfix for grid calculation for 'frames'

Grid calculations for frames and seconds were mixed up, meaning that grid was often off.
This commit is contained in:
Joshua Leung 2008-12-06 10:25:51 +00:00
parent afb45ae7cf
commit 45cc5197e3

@ -570,7 +570,7 @@ View2DGrid *UI_view2d_calc_grid(const bContext *C, View2D *v2d, short unit, shor
grid= MEM_callocN(sizeof(View2DGrid), "View2DGrid");
/* rule: gridstep is minimal GRIDSTEP pixels */
if (unit == V2D_UNIT_FRAMES) {
if (unit == V2D_UNIT_SECONDS) {
secondgrid= 1;
seconddiv= 0.01f * FPS;
}