Commit 2ee8d29f authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

improved zooming functionality to avoid erroneous resizing of gop objects that also display scalars

parent 597a6aba
......@@ -4795,7 +4795,8 @@ static void canvas_dofont(t_canvas *x, t_floatarg font, t_floatarg xresize,
gobj_getrect(y, x, &x1, &y1, &x2, &y2);
nx1 = x1 * xresize + 0.5;
ny1 = y1 * yresize + 0.5;
gobj_displace(y, x, nx1-x1, ny1-y1);
if (pd_class(&y->g_pd) != scalar_class)
gobj_displace(y, x, nx1-x1, ny1-y1);
}
}
if (glist_isvisible(x))
......
......@@ -698,7 +698,7 @@ void glist_redraw(t_glist *x)
if (glist_isvisible(x))
{
/* LATER fix the graph_vis() code to handle both cases */
if (glist_istoplevel(x))
if (glist_istoplevel(x) && x->gl_havewindow)
{
t_gobj *g;
t_linetraverser t;
......@@ -1029,7 +1029,7 @@ static void graph_getrect(t_gobj *z, t_glist *glist,
{
/* don't do this for arrays, just let them hang outside the
box. */
if (pd_class(&g->g_pd) == garray_class)
if (pd_class(&g->g_pd) == garray_class || pd_class(&g->g_pd) == scalar_class)
continue;
gobj_getrect(g, x, &x21, &y21, &x22, &y22);
if (x22 > x2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment