diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index e32bfaa39c0ee6efb0e3b9df796b530464aa5c25..63a3fa075c39971ffb4bda76683e202aa2063c03 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -596,19 +596,20 @@ void canvas_resortoutlets(t_canvas *x) static void graph_bounds(t_glist *x, t_floatarg x1, t_floatarg y1, t_floatarg x2, t_floatarg y2) { - x->gl_x1 = x1; - x->gl_x2 = x2; - x->gl_y1 = y1; - x->gl_y2 = y2; - if (x->gl_x2 == x->gl_x1 || - x->gl_y2 == x->gl_y1) - { + if (x1==x2 || y1==y2) { error("graph: empty bounds rectangle"); x1 = y1 = 0; x2 = y2 = 1; } - if (!do_not_redraw) - glist_redraw(x); + if (x->gl_x1!=x1 || x->gl_y1!=y1 || x->gl_x2!=x2 || x->gl_y2!=y2) { + //printf("%f %f %f %f %f %f %f %f\n",x->gl_x1,x1,x->gl_y1,y1,x->gl_x2,x2,x->gl_y2,y2); + x->gl_x1 = x1; + x->gl_x2 = x2; + x->gl_y1 = y1; + x->gl_y2 = y2; + if (!do_not_redraw) + glist_redraw(x); + } } static void graph_xticks(t_glist *x,