Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7263
Modified Files: Tag: devel_0_39 desire.tk Log Message: some changes in Canvas clear_wires to shpport muptile objects
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.540 retrieving revision 1.1.2.541 diff -C2 -d -r1.1.2.540 -r1.1.2.541 *** desire.tk 31 Oct 2006 00:02:33 -0000 1.1.2.540 --- desire.tk 31 Oct 2006 14:18:28 -0000 1.1.2.541 *************** *** 2450,2453 **** --- 2450,2454 ---- def Canvas motion_imove {oldpos x y} { mset {ox oy} $oldpos + if {$@keynav} {$@active draw} if {[llength $@selection] == 1} { set obj $@selection *************** *** 2537,2540 **** --- 2538,2542 ---- set c [$self widget] mset {type id detail} $target + if {[llength $@keynav_iosel_i] || [llength $@keynav_iosel_o]} {return} if {$@editmode && [$id canvas] == $self} { switch $type { *************** *** 2819,2837 ****
def Canvas clear_wires {} { - if {[llength $@selection] != 1} return set @auto_wire_obj2 {}; set @auto_wire_obj1 {} ! set obj $@selection ! set nouts [$obj noutlets]; set nins [$obj ninlets] ! foreach wire $@wires { ! mset {obj1 port1 obj2 port2} [$wire report] ! if {$obj1 == $obj} { ! $self disconnect [$wire connects] ! if {!$port1} {lappend @auto_wire_obj2 $obj2} } ! if {$obj2 == $obj} { ! $self disconnect [$wire connects] ! if {!$port2} {lappend @auto_wire_obj1 $obj1} } - } } --- 2821,2868 ----
def Canvas clear_wires {} { set @auto_wire_obj2 {}; set @auto_wire_obj1 {} ! if {[llength $@selection] == 1 } { ! set objs $@selection ! } else { ! if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} { ! return ! } else { ! set objs $@keynav_iosel_i ! lappend objs $@keynav_iosel_o } ! } ! foreach obj $objs { ! if {![llength [$obj ioselect]]} { ! set port 0; set type "none" ! } else { ! set port [lindex [$obj ioselect] 0] ! set type [lindex [$obj ioselect] 1] ! } ! foreach wire [$obj wires] { ! mset {obj1 port1 obj2 port2} [$wire report] ! switch $type { ! i { ! if {$obj2 == $obj && $port2 == $port} { ! $self disconnect [$wire connects] ! if {!$port2} {lappend @auto_wire_obj1 $obj1} ! } ! } ! o { ! if {$obj1 == $obj && $port1 == $port} { ! $self disconnect [$wire connects] ! if {!$port1} {lappend @auto_wire_obj2 $obj2} ! } ! } ! none { ! $self disconnect [$wire connects] ! if {$obj1 == $obj} { ! if {!$port1} {lappend @auto_wire_obj2 $obj2} ! } ! if {$obj2 == $obj} { ! if {!$port2} {lappend @auto_wire_obj1 $obj1} ! } ! } ! } } } }