Commit b9c87faa authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*forced array graphs to keep GOP/hidetext under all circumstances (later...

*forced array graphs to keep GOP/hidetext under all circumstances (later update properties window so that the GUI reflects this rather than printing info in the console)
parent 7779eb8e
......@@ -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));
}
......
......@@ -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)
......
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