diff options
Diffstat (limited to 'pd/src/g_text.c')
-rw-r--r-- | pd/src/g_text.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pd/src/g_text.c b/pd/src/g_text.c index fa28f70e..bbdb7729 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -145,8 +145,11 @@ void canvas_obj(t_glist *gl, t_symbol *s, int argc, t_atom *argv) canvas_objtext(gl, atom_getintarg(0, argc, argv), atom_getintarg(1, argc, argv), 0, b); } - else - { + else if(!glist_isvisible(gl)){ + /* JMZ: not a good idea to go into interactive mode in a closed canvas... */ + post("unable to create stub object in closed canvas!"); + return; + } else { t_binbuf *b = binbuf_new(); int xpix, ypix; pd_vmess(&gl->gl_pd, gensym("editmode"), "i", 1); @@ -417,6 +420,11 @@ void canvas_msg(t_glist *gl, t_symbol *s, int argc, t_atom *argv) else { int xpix, ypix; + /* JMZ: not a good idea to go into interactive mode in a closed canvas... */ + if(!glist_isvisible(gl)){ + post("unable to create stub message in closed canvas!"); + return; + } pd_vmess(&gl->gl_pd, gensym("editmode"), "i", 1); glist_noselect(gl); glist_getnextxy(gl, &xpix, &ypix); @@ -922,7 +930,7 @@ static void text_getrect(t_gobj *z, t_glist *glist, { t_text *x = (t_text *)z; int width, height, iscomment = (x->te_type == T_TEXT); - float x1, y1, x2, y2; + t_float x1, y1, x2, y2; /* for number boxes, we know width and height a priori, and should report them here so that graphs can get swelled to fit. */ |