diff --git a/src/g_editor.c b/src/g_editor.c index f4e5733ef0c4a9f6c98126661e4054723ebcc778..e0d19f6e9038b1615e7715961f31e30d8f0dc5e5 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -1422,24 +1422,22 @@ void *canvas_undo_set_create(t_canvas *x) } 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); - } - } - //} + 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); + } + } return (buf); }