Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv665
Modified Files: Tag: desiredata desire.tk Log Message: more sensible pasting when subpatcherizing
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.147 retrieving revision 1.1.2.600.2.148 diff -C2 -d -r1.1.2.600.2.147 -r1.1.2.600.2.148 *** desire.tk 31 Dec 2006 18:49:19 -0000 1.1.2.600.2.147 --- desire.tk 2 Jan 2007 13:30:17 -0000 1.1.2.600.2.148 *************** *** 3295,3299 **** def Canvas new_object_subpatcherize {subpatch} {$subpatch subpatcherize_paste} def Canvas new_object_subpatcherize_inletconnect {inlet obj} { - puts " inlet::: $inlet" if {[regexp {^[0-9]{1,8}i} $inlet idx]} {set idx [string trimright $idx i]} if {[regexp {i[0-9]{1,8}} $inlet port]} {set port [string trimleft $port i]} --- 3295,3298 ---- *************** *** 3397,3401 **** set i 0 foreach outlet $::subpatcherize(outgoing_outlet) { ! netsend [list #X obj [expr $i*100] 200 outlet] \ [list $self new_object_subpatcherize_outletconnect $outlet] incr i --- 3396,3402 ---- set i 0 foreach outlet $::subpatcherize(outgoing_outlet) { ! mset {xcoords ycoords} [$self clipboard_coords 0] ! set y [expr [lindex [lsort -increasing $ycoords] end] + 20] ! netsend [list #X obj [expr $i*100] $y outlet] \ [list $self new_object_subpatcherize_outletconnect $outlet] incr i *************** *** 3407,3412 **** set in 0 $self deselect_all netsend [list .$self "push"] ! foreach mess [pd_mess_split [$::clipboard value]] {netsend $mess} $self subpatcherize_makeports netsend [list #X pop 1] --- 3408,3424 ---- set in 0 $self deselect_all + mset {xcoords ycoords} [$self clipboard_coords 0] + set x [expr [lindex [lsort -increasing $xcoords] 0] - 50] + set y [expr [lindex [lsort -increasing $ycoords] 0] - 50] netsend [list .$self "push"] ! foreach mess [pd_mess_split [$::clipboard value]] { ! set type [lindex $mess 1] ! if {$type != "" && $type != "canvas" && $type != "connect"} { ! set x1 [lindex $mess 2] ! set y1 [lindex $mess 3] ! set mess2 [lreplace $mess 2 3 [expr $x1 - $x] [expr $y1 -$y]] ! netsend $mess2 ! } else {netsend $mess} ! } $self subpatcherize_makeports netsend [list #X pop 1]