From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/src/g_text.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'pd/src/g_text.c') diff --git a/pd/src/g_text.c b/pd/src/g_text.c index b502446b..13619493 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -7,7 +7,9 @@ /* all changes are labeled with iemlib */ #include +#include "m_pd.h" #include "m_imp.h" +#include "s_stuff.h" #include "t_tk.h" #include "g_canvas.h" #include @@ -921,8 +923,9 @@ static void text_select(t_gobj *z, t_glist *glist, int state) t_text *x = (t_text *)z; t_rtext *y = glist_findrtext(glist, x); rtext_select(y, state); - sys_vgui(".x%x.c itemconfigure %sR -fill %s\n", glist, - rtext_gettag(y), (state? "blue" : "black")); + if (glist_isvisible(glist) && text_shouldvis(x, glist)) + sys_vgui(".x%x.c itemconfigure %sR -fill %s\n", glist, + rtext_gettag(y), (state? "blue" : "black")); } static void text_activate(t_gobj *z, t_glist *glist, int state) @@ -954,20 +957,22 @@ static void text_vis(t_gobj *z, t_glist *glist, int vis) { if (text_shouldvis(x, glist)) { - t_rtext *y = rtext_new(glist, x, glist->gl_editor->e_rtext, 1); + t_rtext *y = glist_findrtext(glist, x); if (x->te_type == T_ATOM) glist_retext(glist, x); text_drawborder(x, glist, rtext_gettag(y), rtext_width(y), rtext_height(y), 1); + rtext_draw(y); } - else rtext_new(glist, x, glist->gl_editor->e_rtext, 0); } else { t_rtext *y = glist_findrtext(glist, x); if (text_shouldvis(x, glist)) + { text_eraseborder(x, glist, rtext_gettag(y)); - rtext_free(y); + rtext_erase(y); + } } } -- cgit v1.2.1