Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6738
Modified Files: Tag: desiredata desire.tk Log Message: small fixes part II
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.383 retrieving revision 1.1.2.600.2.384 diff -C2 -d -r1.1.2.600.2.383 -r1.1.2.600.2.384 *** desire.tk 16 Aug 2007 19:51:15 -0000 1.1.2.600.2.383 --- desire.tk 16 Aug 2007 20:11:09 -0000 1.1.2.600.2.384 *************** *** 2046,2050 **** def Canvas o {x y {name ""}} { set c [$self widget] ! set @curpos [list [$c canvasx $x] [$c canvasy $y]] $self new_object obj $name } --- 2046,2051 ---- def Canvas o {x y {name ""}} { set c [$self widget] ! if {[$self snap_grid]} {set off [expr [$self look grid_size]/2]} {set off 0} ! set @curpos [list [expr [$c canvasx $x]+$off] [expr [$c canvasy $y]+$off]] $self new_object obj $name } *************** *** 3910,3914 **** mset {ox1 oy1 ox2 oy2} [$obj bbox] mset ys [expr $oy2-$oy1] ! mset {brk_wires brk_quads} [$self broken_wires $type $k $port] switch $type { i {mset {nx ny} [$self xy_snap $bx1 [expr $by1-25]]} --- 3911,3915 ---- mset {ox1 oy1 ox2 oy2} [$obj bbox] mset ys [expr $oy2-$oy1] ! mset {brk_wires brk_quads} [$self broken_wires $type $k $port $self] switch $type { i {mset {nx ny} [$self xy_snap $bx1 [expr $by1-25]]} *************** *** 3923,3939 **** def Canvas outlet_expand {k outlet} {set reconnect [$self broken_wires o $k $inlet]}
! def Canvas broken_wires {type k port} { ! puts "$self obj hash>>>>> $@objects" ! set obj [$@objects get $k] ! set wires [$obj wires2]; set brk_wires {}; set quads {} ! foreach wire $wires { ! mset {f2 o2 t2 i2} [$wire connects] ! if {$t2==$k && $i2==$port && $type=="i"} {lappend brk_wires $wire; lappend quads [$wire connects]} ! if {$f2==$k && $o2==$port && $type=="o"} {lappend brk_wires $wire; lappend quads [$wire connects]} ! } ! return [list $brk_wires $quads] ! } ! ! def Canvas broken_wires2 {type k port canvas} { set shash [$canvas objectsel] set obj [[$canvas objects] get $k] --- 3924,3928 ---- def Canvas outlet_expand {k outlet} {set reconnect [$self broken_wires o $k $inlet]}
! def Canvas broken_wires {type k port canvas} { set shash [$canvas objectsel] set obj [[$canvas objects] get $k] *************** *** 4009,4017 **** foreach obj [$@objectsel values] { for {set i 0} {$i < [$obj ninlets]} {incr i} { ! mset {brk_wires brk_quads} [$self broken_wires2 i [$@objects search $obj] $i $self] if {[llength $brk_wires]} {foreach wire $brk_quads {lappend broken [concat i $wire ]}} } for {set o 0} {$o < [$obj noutlets]} {incr o} { ! mset {brk_wires brk_quads} [$self broken_wires2 o [$@objects search $obj] $o $self] if {[llength $brk_wires]} {foreach wire $brk_quads {lappend broken [concat o $wire]}} } --- 3998,4006 ---- foreach obj [$@objectsel values] { for {set i 0} {$i < [$obj ninlets]} {incr i} { ! mset {brk_wires brk_quads} [$self broken_wires i [$@objects search $obj] $i $self] if {[llength $brk_wires]} {foreach wire $brk_quads {lappend broken [concat i $wire ]}} } for {set o 0} {$o < [$obj noutlets]} {incr o} { ! mset {brk_wires brk_quads} [$self broken_wires o [$@objects search $obj] $o $self] if {[llength $brk_wires]} {foreach wire $brk_quads {lappend broken [concat o $wire]}} }