Fix for bug #6850: after zooming into the curve widget it could
become impossible to zoom out (with clipping enabled).
This commit is contained in:
@@ -319,6 +319,7 @@ static void curvemap_buttons_zoom_out(void *cumap_v, void *unused)
|
||||
d1= cumap->curr.xmin - cumap->clipr.xmin;
|
||||
cumap->curr.xmin-= d1;
|
||||
|
||||
d1= d;
|
||||
if(cumap->flag & CUMA_DO_CLIP)
|
||||
if(cumap->curr.xmax+d > cumap->clipr.xmax)
|
||||
d1= -cumap->curr.xmax + cumap->clipr.xmax;
|
||||
@@ -331,6 +332,7 @@ static void curvemap_buttons_zoom_out(void *cumap_v, void *unused)
|
||||
d1= cumap->curr.ymin - cumap->clipr.ymin;
|
||||
cumap->curr.ymin-= d1;
|
||||
|
||||
d1= d;
|
||||
if(cumap->flag & CUMA_DO_CLIP)
|
||||
if(cumap->curr.ymax+d > cumap->clipr.ymax)
|
||||
d1= -cumap->curr.ymax + cumap->clipr.ymax;
|
||||
|
||||
@@ -356,9 +356,11 @@ static int node_buts_time(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *b
|
||||
|
||||
curvemap_buttons(block, node->storage, 's', B_NODE_EXEC+node->nr, B_REDR, butr);
|
||||
|
||||
if(cumap) cumap->flag |= CUMA_DRAW_CFRA;
|
||||
if(node->custom1<node->custom2)
|
||||
cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1);
|
||||
if(cumap) {
|
||||
cumap->flag |= CUMA_DRAW_CFRA;
|
||||
if(node->custom1<node->custom2)
|
||||
cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1);
|
||||
}
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButS(block, NUM, B_NODE_EXEC+node->nr, "Sta:",
|
||||
|
||||
Reference in New Issue
Block a user