diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c index 1b2ca8b6f2f589e49096faefdae9643ba6b74ba1..5223d5ba4d714bd2a030b6a4559aac068b16384f 100644 --- a/pd/src/g_canvas.c +++ b/pd/src/g_canvas.c @@ -593,14 +593,18 @@ void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv) int glist_isgraph(t_glist *x) { // testing to see if we have an array and force hiding text (later update GUI accordingly) + // we likely need this to silently update legacy arrays + // (no regressions are expected but this needs to be tested) t_gobj *g = x->gl_list; int hasarray = 0; while (g) { if (pd_class(&g->g_pd) == garray_class) hasarray = 1; g = g->g_next; } - if (hasarray && x->gl_isgraph && !x->gl_hidetext) + if (hasarray) { + x->gl_isgraph = 1; x->gl_hidetext = 1; + } return (x->gl_isgraph|(x->gl_hidetext<<1)); } diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index 725fd9f4812630db2f7b8f1d6cc5b0c013de8690..88911058bd47a0eeee71fccc8836d594810ea16d 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -2370,18 +2370,15 @@ void canvas_setgraph(t_glist *x, int flag, int nogoprect) } x->gl_isgraph = 1; x->gl_hidetext = !(!(flag&2)); - // check if we have array inside GOP, if so, make sure hidetext is always hidden no matter what - t_gobj *g = x->gl_list; - int hasarray = 0; - while (g) { - if (pd_class(&g->g_pd) == garray_class) hasarray = 1; - g = g->g_next; - } - if (hasarray) - x->gl_hidetext = 1; - + t_gobj *g = x->gl_list; + int hasarray = 0; + while (g) { + if (pd_class(&g->g_pd) == garray_class) hasarray = 1; + g = g->g_next; + } + if (hasarray) x->gl_hidetext = 1; if (!nogoprect && !x->gl_goprect) { @@ -2476,6 +2473,18 @@ static void canvas_donecanvasdialog(t_glist *x, if (yperpix == 0) yperpix = 1; + // check if we have array inside GOP, if so, make sure GOP/hidetext is always enabled no matter what + t_gobj *g = x->gl_list; + int hasarray = 0; + while (g) { + if (pd_class(&g->g_pd) == garray_class) hasarray = 1; + g = g->g_next; + } + if (hasarray && graphme != 3) { + graphme = 3; //gop flag + bit-shifted hidetext + post("Array graphs cannot have their 'graph on parent' or 'hide object name and arguments' options disabled"); + } + if (graphme) { if (x1 != x2)