aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flattr_ed.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-12-12 03:41:32 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-12-12 03:41:32 +0000
commitdd500deadc8cc4577a305a9f1fe438786671f9e6 (patch)
tree4e73ff62c4a697446570a2f64c470978b7725204 /externals/grill/flext/source/flattr_ed.cpp
parentc0ca4188c9813ddb28076c025fdcd3f4f100abeb (diff)
""
svn path=/trunk/; revision=1217
Diffstat (limited to 'externals/grill/flext/source/flattr_ed.cpp')
-rw-r--r--externals/grill/flext/source/flattr_ed.cpp56
1 files changed, 30 insertions, 26 deletions
diff --git a/externals/grill/flext/source/flattr_ed.cpp b/externals/grill/flext/source/flattr_ed.cpp
index fb6183ed..6b2b1d96 100644
--- a/externals/grill/flext/source/flattr_ed.cpp
+++ b/externals/grill/flext/source/flattr_ed.cpp
@@ -64,9 +64,6 @@ void flext_base::SetAttrEditor(t_classid c)
widgetbehavior.w_clickfn = text_widgetbehavior.w_clickfn;
#endif
- widgetbehavior.w_visfn = cb_GfxVis;
- class_setwidget(c, &widgetbehavior);
-
#if PD_MINOR_VERSION >= 37
class_setpropertiesfn(c,cb_GfxProperties);
class_setsavefn(c,cb_GfxSave);
@@ -75,6 +72,9 @@ void flext_base::SetAttrEditor(t_classid c)
widgetbehavior.w_savefn = cb_GfxSave;
#endif
+ widgetbehavior.w_visfn = cb_GfxVis;
+ class_setwidget(c, &widgetbehavior);
+
// generate the script for the property dialog
sys_gui(
@@ -411,29 +411,33 @@ void flext_base::cb_GfxProperties(t_gobj *c, t_glist *)
//! Strip the attributes off the object command line
void flext_base::cb_GfxVis(t_gobj *c, t_glist *gl, int vis)
{
- t_text *x = (t_text *)c;
-
- FLEXT_ASSERT(x->te_binbuf);
-
- int argc = binbuf_getnatom(x->te_binbuf);
- t_atom *argv = binbuf_getvec(x->te_binbuf);
- int cnt = CheckAttrib(argc,argv);
-
- if(cnt) {
- t_binbuf *nb = binbuf_new();
- binbuf_restore(nb,cnt,argv);
- binbuf_free(x->te_binbuf);
- x->te_binbuf = nb;
- }
-
- t_rtext *rt = glist_findrtext(gl,x);
- rtext_retext(rt);
-
-#ifdef FLEXT_CLONEWIDGET
- text_widgetbehavior.w_visfn(c,gl,vis);
-#else
- ori_vis(c,gl,vis);
-#endif
+ // show object if it's not a GOP
+ if(!gl->gl_isgraph || gl->gl_havewindow) {
+
+ t_text *x = (t_text *)c;
+ FLEXT_ASSERT(x->te_binbuf);
+
+ int argc = binbuf_getnatom(x->te_binbuf);
+ t_atom *argv = binbuf_getvec(x->te_binbuf);
+ int cnt = CheckAttrib(argc,argv);
+
+ if(cnt) {
+ t_binbuf *nb = binbuf_new();
+ binbuf_restore(nb,cnt,argv);
+ binbuf_free(x->te_binbuf);
+ x->te_binbuf = nb;
+ }
+
+ t_rtext *rt = glist_findrtext(gl,x);
+ rtext_retext(rt);
+
+ // now display the changed text with the normal drawing function
+ #ifdef FLEXT_CLONEWIDGET
+ text_widgetbehavior.w_visfn(c,gl,vis);
+ #else
+ ori_vis(c,gl,vis);
+ #endif
+ }
}
static void BinbufAdd(t_binbuf *b,const t_atom &at)