Bugfix, own collection
Graph editor: sliding Nkey Properties to left, closing curves view entirely, was hanging in eternal loop. Caused by division by zero.
This commit is contained in:
@@ -1133,9 +1133,11 @@ View2DGrid *UI_view2d_grid_calc(Scene *scene, View2D *v2d, short xunits, short x
|
||||
space= v2d->cur.xmax - v2d->cur.xmin;
|
||||
pixels= (float)(v2d->mask.xmax - v2d->mask.xmin);
|
||||
|
||||
grid->dx= (U.v2d_min_gridsize * space) / (seconddiv * pixels);
|
||||
step_to_grid(&grid->dx, &grid->powerx, xunits);
|
||||
grid->dx *= seconddiv;
|
||||
if(pixels!=0.0f) {
|
||||
grid->dx= (U.v2d_min_gridsize * space) / (seconddiv * pixels);
|
||||
step_to_grid(&grid->dx, &grid->powerx, xunits);
|
||||
grid->dx *= seconddiv;
|
||||
}
|
||||
|
||||
if (xclamp == V2D_GRID_CLAMP) {
|
||||
if (grid->dx < 0.1f) grid->dx= 0.1f;
|
||||
|
||||
Reference in New Issue
Block a user