hi Miller,
the possibility to have multiple copies of the same connection between objects in a patch, i.e. to make a connection [x]_n -> m_[y], when [x]_n is already connected to m_[y], is left open, both on a gui level (which means always showing a circle around an inlet), and in further processing.
I think this should not be allowed, because there is only one visible line, but the other, `ghost' connections remain active. So, in case, you agree, you may look at a simple fix attached.
I have not dealt with `setcursor' branch. The needed check, quite similar, would cause some (usually minor) slowdown -- you decide.
Krzysztof
btw, no such duplicates are allowed in max...
--- g_editor.c~ Tue Apr 2 07:14:18 2002 +++ g_editor.c Mon Apr 22 11:58:32 2002 @@ -665,7 +665,7 @@ if (closest2 >= ninlet2) closest2 = ninlet2 - 1;
oc = obj_connect(ob1, closest1, ob2, closest2);
if (!(oc = obj_connect(ob1, closest1, ob2, closest2))) return;
lx1 = x11 + (noutlet1 > 1 ?
((x12-x11-IOWIDTH) * closest1)/(noutlet1-1) : 0)
+ IOMIDDLE;
--- m_obj.c~ Sat Dec 15 08:20:57 2001 +++ m_obj.c Mon Apr 22 12:00:06 2002 @@ -411,16 +411,21 @@ if (!i) return (0); to = &i->i_pd; doit:
/* append it to the end of the list and inhibit duplicates */
while (oc2->oc_next)
oc2 = oc2->oc_next;
if (oc2->oc_to == to) return (0);
/* append it to the end of the list */
/* LATER we might cache the last "oc" to make this faster. */
while (oc2->oc_next) oc2 = oc2->oc_next;