From c4c645846f9ba5df1a0cd031df7cf5957fa6578d Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Tue, 16 Jun 2020 00:09:18 -0400 Subject: [PATCH] fix regression caused by unnecessarily unvis'ing gobjs in graph_vis This was initially part of an effort to prevent double binding to scalars for certain event callbacks. By unvis'ing all scalars in the graph this would ensure the symbol would get unbound. However, we're already doing that in canvas_map. So it appears this extra unvis'ing in graph_vis was unnecessary. However, it looks like the scalar in a gop will get unvis'd twice when destroying the gop canvas. No idea why that is, but if there's a regression perhaps one of the few people using scalar events will report a regression :) --- pd/src/g_graph.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index dfbf6739c..fcaa0b44b 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -949,17 +949,6 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) } else if (gobj_shouldvis(gr, parent_glist)) { - /* erase contents of glist. We need to do this because - scalar_vis is currently using pd_bind/unbind to handle - scalar events. */ - for (g = x->gl_list; g; g = g->g_next) - { - gop_redraw = 1; - //fprintf(stderr,"drawing gop objects\n"); - gobj_vis(g, x, 0); - //fprintf(stderr,"done\n"); - gop_redraw = 0; - } gui_vmess("gui_gobj_erase", "xs", glist_getcanvas(x->gl_owner), tag); -- GitLab