From cab5f9ece1a539009492ce4d1d95d5d05011c47d Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Thu, 21 Jan 2016 22:00:45 -0500
Subject: [PATCH] port from pd-l2ork git:
 cec11bb6d99641ecc803ca5c6eafeec80e82e3e6 *fixed a bug/regression reported by
 Liam Goodacre regarding label inside GOP when it exists frame and needs to
 reapper (due to script-based repositioning) would crash pd-l2ork. See
 http://disis.music.vt.edu/pipermail/l2ork-dev/2016-January/000811.html for
 more info.

---
 pd/src/g_all_guis.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c
index 1a58e998b..271d57905 100644
--- a/pd/src/g_all_guis.c
+++ b/pd/src/g_all_guis.c
@@ -433,8 +433,12 @@ void iemgui_shouldvis(t_iemgui *x, int mode)
                    to ensure that ordering is honored */
                 t_canvas *canvas = glist_getcanvas(x->x_glist);
                 t_gobj *y = (t_gobj *)x->x_glist;
-                gobj_vis(y, canvas, 0);
-                gobj_vis(y, canvas, 1);
+                // this crashes when the label goes invisible and then
+                // needs to be made visible again, so for the time being
+                // we use the brute force redraw below for both the
+                // vis/unvis-ing of the object and its reordering
+                //gobj_vis(y, canvas, 0);
+                //gobj_vis(y, canvas, 1);
                 // reorder it visually
                 glist_redraw(canvas);
 
-- 
GitLab