Skip to content
Snippets Groups Projects
Commit 6015fc89 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*partial backport of a fix to allow subpatches to be renamed with no arguments...

*partial backport of a fix to allow subpatches to be renamed with no arguments without losing their inner content (see g_text setto call). Thanks to Jonathan Wilkes for the bug report.
parent 54ace157
No related branches found
No related tags found
No related merge requests found
......@@ -2205,12 +2205,11 @@ void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize, int pos)
vec2 = binbuf_getvec(b);
/* special case: if pd subpatch is valid and its args change,
and its new name is valid, just pass the message on. */
if (x->te_pd == canvas_class &&
(natom1 >= 1 && natom2 >= 1 && vec1[0].a_type == A_SYMBOL
&& !strcmp(vec1[0].a_w.w_symbol->s_name, "pd") &&
vec2[0].a_type == A_SYMBOL
&& !strcmp(vec2[0].a_w.w_symbol->s_name, "pd") &&
vec2[1].a_type == A_SYMBOL))
if (x->te_pd == canvas_class && natom1 >= 1 && natom2 >= 1
&& vec1[0].a_type == A_SYMBOL
&& !strcmp(vec1[0].a_w.w_symbol->s_name, "pd")
&& vec2[0].a_type == A_SYMBOL
&& !strcmp(vec2[0].a_w.w_symbol->s_name, "pd"))
{
//fprintf(stderr,"setto canvas\n");
//first check if the contents have changed to see if there is
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment