From baf0132d29d2db546654f96a2357860c1c0513ee Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Sat, 17 Dec 2011 02:08:24 -0500
Subject: [PATCH] removed redundant drawing of nlets on invalid objects

---
 src/g_text.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/g_text.c b/src/g_text.c
index 450a1b6f0..664720d60 100644
--- a/src/g_text.c
+++ b/src/g_text.c
@@ -1445,6 +1445,8 @@ static t_widgetbehavior gatom_widgetbehavior =
 void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
     char *tag, int x1, int y1, int x2, int y2)
 {
+	if (pd_class(&ob->te_pd) == text_class)
+		return;
 	//fprintf(stderr,"glist_drawiofor\n");
     int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
     int width = x2 - x1;
@@ -1513,6 +1515,8 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
 void glist_drawiofor_withtag(t_glist *glist, t_object *ob, int firsttime,
     char *tag, int x1, int y1, int x2, int y2)
 {
+	if (pd_class(&ob->te_pd) == text_class)
+		return;
 	//fprintf(stderr,"drawiofor_withtag\n");
     int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
     int width = x2 - x1;
-- 
GitLab