[Gridflow-cvs] [svn] commit: r4712 - /trunk/src/classes2.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Nov 2 21:36:51 EST 2009


Author: matju
Date: Mon Nov  2 21:36:51 2009
New Revision: 4712

Log:
no more #X text droppings all over the canvas

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Mon Nov  2 21:36:51 2009
@@ -1122,6 +1122,15 @@
 	post("doesn't work with DesireData");
 #endif
 }
+extern t_widgetbehavior text_widgetbehavior;
+t_widgetbehavior text_widgetbehavi0r;
+static void text_visfn_hax0r (t_gobj *o, t_canvas *can, int vis) {
+	text_widgetbehavior.w_visfn(o,can,vis);
+	if (!vis) {
+	        t_rtext *y = glist_findrtext(can,(t_text *)o);
+		if (gobj_shouldvis((t_gobj *)o,can)) glist_eraseiofor(can,(t_object *)o,rtext_gettag(y));
+	}
+}
 \end class {
 	install("gf/lol",1,1);
 #ifndef DESIREDATA
@@ -1136,6 +1145,9 @@
 	  floatinlet_class = pd_class((t_pd *)  floatinlet_new(bogus,0));
 	 symbolinlet_class = pd_class((t_pd *) symbolinlet_new(bogus,0));
 	pointerinlet_class = pd_class((t_pd *)pointerinlet_new(bogus,0));
+	memcpy(&text_widgetbehavi0r,&text_widgetbehavior,sizeof(t_widgetbehavior));
+	text_widgetbehavi0r.w_visfn = text_visfn_hax0r;
+	class_setwidget(text_class,&text_widgetbehavi0r);
 #endif
 }
 



More information about the Gridflow-cvs mailing list