aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_text.c
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
commit9c0e19a3be2288db79e2502e5fa450c3e20a668d (patch)
treeca97ce615e037a533304fc4660dcf372ca3b9cd6 /pd/src/g_text.c
parentef50dd62804d54af7da18d8bd8413c0dccd729b8 (diff)
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
Diffstat (limited to 'pd/src/g_text.c')
-rw-r--r--pd/src/g_text.c15
1 files changed, 10 insertions, 5 deletions
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 <stdlib.h>
+#include "m_pd.h"
#include "m_imp.h"
+#include "s_stuff.h"
#include "t_tk.h"
#include "g_canvas.h"
#include <stdio.h>
@@ -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);
+ }
}
}