diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2007-12-28 03:43:06 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2007-12-28 03:43:06 +0000 |
commit | 019c0e56579fe7f94982434d8efcd7b00d8df0aa (patch) | |
tree | b221f8e00973d9a501ed7085e9f2b95fabb0009a /pd/src/g_text.c | |
parent | 44e68e4348f7ca86f4209f3f86ac7b6cb49acd52 (diff) |
... and again trying to check in 0.41-0 test 10
svn path=/trunk/; revision=9108
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. */ |