From f3ef61cae7b1f314af298df8ec3bdea462f1fdf2 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Tue, 6 Dec 2011 19:50:06 -0500
Subject: [PATCH] Fixed minor regression in undo_cut where first connection was
 not getting saved

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

diff --git a/src/g_editor.c b/src/g_editor.c
index 6820bcaff..56603795f 100644
--- a/src/g_editor.c
+++ b/src/g_editor.c
@@ -617,24 +617,24 @@ static void *canvas_undo_set_cut(t_canvas *x, int mode)
         /* store connections into/out of the selection */
     buf->u_reconnectbuf = binbuf_new();
     linetraverser_start(&t, x);
-	if (linetraverser_next(&t)) {
-		while (oc = linetraverser_next(&t))
-		{
-		    int issel1 = glist_isselected(x, &t.tr_ob->ob_g);
-		    int issel2 = glist_isselected(x, &t.tr_ob2->ob_g);
-		    if (issel1 != issel2)
-		    {
-		        binbuf_addv(buf->u_reconnectbuf, "ssiiii;",
-		            gensym("#X"), gensym("connect"),
-		            (issel1 ? nnotsel : 0)
-		                + glist_selectionindex(x, &t.tr_ob->ob_g, issel1),
-		            t.tr_outno,
-		            (issel2 ? nnotsel : 0) +
-		                glist_selectionindex(x, &t.tr_ob2->ob_g, issel2),
-		            t.tr_inno);
-		    }
-		}
+	//if (linetraverser_next(&t)) {
+	while (oc = linetraverser_next(&t))
+	{
+	    int issel1 = glist_isselected(x, &t.tr_ob->ob_g);
+	    int issel2 = glist_isselected(x, &t.tr_ob2->ob_g);
+	    if (issel1 != issel2)
+	    {
+	        binbuf_addv(buf->u_reconnectbuf, "ssiiii;",
+	            gensym("#X"), gensym("connect"),
+	            (issel1 ? nnotsel : 0)
+	                + glist_selectionindex(x, &t.tr_ob->ob_g, issel1),
+	            t.tr_outno,
+	            (issel2 ? nnotsel : 0) +
+	                glist_selectionindex(x, &t.tr_ob2->ob_g, issel2),
+	            t.tr_inno);
+	    }
 	}
+	//}
     if (mode == UCUT_TEXT)
     {
         buf->u_objectbuf = canvas_docopy(x);
-- 
GitLab