From 5982aaab3befe4827a639edb79d801e2ab75a0df Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Thu, 21 Jan 2016 21:57:05 -0500
Subject: [PATCH] port from pd-l2ork git:
 63d853e3343fe76ad7b06c5c239bf2af5f217bfc *fixed bug reported by Liam Goodacre
 regarding donecanvasdialog causing parent patch to open in case subpatch's
 properties have been changes (e.g. via scripting). See
 http://disis.music.vt.edu/pipermail/l2ork-dev/2016-January/000810.html for
 more info.

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

diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 45f580321..71dec7c53 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -2851,8 +2851,14 @@ static void canvas_donecanvasdialog(t_glist *x,
     {
         glist_noselect(x);
         gobj_vis(&x->gl_gobj, x->gl_owner, 0);
-        gobj_vis(&x->gl_gobj, x->gl_owner, 1);
-        canvas_redraw(x->gl_owner);
+        if (gobj_shouldvis(&x->gl_obj, x->gl_owner))
+        {
+            gobj_vis(&x->gl_gobj, x->gl_owner, 1);
+            //fprintf(stderr,"yes\n");
+        }
+        else
+            canvas_redraw(glist_getcanvas(x->gl_owner));
+        //canvas_redraw(x->gl_owner);
     }
     // ico@bukvic.net 100518 update scrollbars when
     // GOP potentially exceeds window size
-- 
GitLab