From 7a263f3ddbad3dcf5e0944d34eb77c530475a563 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@monsoon-hp.(none)>
Date: Sat, 11 Feb 2012 10:26:18 -0500
Subject: [PATCH] Improved logic for intelligent asking when to save
 abstractions. No longer is it necessary to check whether to save an
 abstraction after it has been changes and only displaced on parent. this is
 because objects are "activated" when selected which potentially means that
 abstractions would be recreated as soon as they are deselected essentially
 making user lose anything they changed in the abstraction and did not save.
 However, in pd-l2ork we check when objects are activated whether their rtext
 (and therefore also its arguments) have changed and only recreate object if
 they did.

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

diff --git a/src/g_editor.c b/src/g_editor.c
index 30f4f55f6..da73d6881 100644
--- a/src/g_editor.c
+++ b/src/g_editor.c
@@ -3006,7 +3006,7 @@ void canvas_mouseup(t_canvas *x,
             t_glist *gl2;
                 /* first though, check we aren't an abstraction with a
                 dirty sub-patch that would be discarded if we edit this. */
-            if (pd_class(&g->g_pd) == canvas_class &&
+            /*if (pd_class(&g->g_pd) == canvas_class &&
                 canvas_isabstraction((t_glist *)g) &&
                     (gl2 = glist_finddirty((t_glist *)g)))
             {
@@ -3017,7 +3017,7 @@ void canvas_mouseup(t_canvas *x,
                     canvas_getrootfor(gl2),
                     canvas_getrootfor(gl2)->gl_name->s_name, gl2);
                 return;
-            }
+            }*/
             /* OK, activate it */
 
 			/*
@@ -3037,10 +3037,10 @@ void canvas_mouseup(t_canvas *x,
 			}
 			// else if it is a regular object
 			*/
-			else {
+			//else {
 				//fprintf(stderr,"reg_obj\n");
 				gobj_activate(x->gl_editor->e_selection->sel_what, x, 1);
-			}
+			//}
         }
 		sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
     }
-- 
GitLab