Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12257
Modified Files: Tag: devel_0_39 desire.tk defaults.ddrc Log Message: pasted objects should alwasy be visible now
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.596 retrieving revision 1.1.2.597 diff -C2 -d -r1.1.2.596 -r1.1.2.597 *** desire.tk 27 Nov 2006 21:17:27 -0000 1.1.2.596 --- desire.tk 27 Nov 2006 23:10:52 -0000 1.1.2.597 *************** *** 2730,2757 **** set w [expr (1 / ($r - $l)) * $width] set h [expr (1 / ($b - $t)) * $height] - puts " l $l :: r $r :: t $t :: b $b" - puts " $w :::: $h" mset {l2 r2} [lmap * [$c xview] $w] mset {t2 b2} [lmap * [$c yview] $h] ! foreach mess [pd_mess_split [$::clipboard value]] { set type [lindex $mess 1] switch $type { ! canvas {} connect {} default { mset {x y} [lmap + [lrange $mess 2 3] $offset] ! if {$x > $r2 || $x < $l2} { ! if {$type != ""} {set visible 0;puts "-----------"; break} ! } ! if {$y > $b2 || $y < $t2} { ! if {$type != ""} {set visible 0;puts "-----------"; break} ! } } - } } ! ! ! puts " $l2 __ $r2 __ $t2 __ $b2 ::: " pd .$self push set paste(state) $self --- 2730,2764 ---- set w [expr (1 / ($r - $l)) * $width] set h [expr (1 / ($b - $t)) * $height] mset {l2 r2} [lmap * [$c xview] $w] mset {t2 b2} [lmap * [$c yview] $h] ! set xcoords {}; set ycoords {} ! foreach mess [pd_mess_split [$::clipboard value]] { set type [lindex $mess 1] switch $type { ! canvas {set in 1} "" {} connect {} default { + if {$type == "restore"} {set in 0} mset {x y} [lmap + [lrange $mess 2 3] $offset] ! if {!$in} {lappend xcoords $x; lappend ycoords $y} } } } ! foreach mess [pd_mess_split [$::clipboard value]] { ! set type [lindex $mess 1] ! switch $type { ! canvas {set in 1} "" {} connect {} ! default { ! if {$type == "restore"} {set in 0} ! mset {x y} [lmap + [lrange $mess 2 3] $offset] ! if {!$in} { ! if {$x > $r2 || $x < $l2} {set visible 0;break} ! if {$y > $b2 || $y < $t2} {set visible 0;break} ! } ! } ! } ! } ! set ref [lsearch $ycoords [lindex [lsort -increasing $ycoords] 0]] ! puts " ref ::::::::::: $ref" pd .$self push set paste(state) $self *************** *** 2759,2786 **** set type [lindex $mess 1] switch $type { ! canvas {set in 1; pd $mess} connect { mset {from outlet to inlet} [lrange $mess 2 end] set count [llength $@children] set mess2 [list #X connect [expr $from+$count] $outlet [expr $to+$count] $inlet] ! if {$in} {pd $mess} else {pd $mess2; if {$type != ""} {incr @wire_count}} } default { if {$type == "restore"} {set in 0} mset {x y} [lmap + [lrange $mess 2 3] $offset] ! if {$x > $r2 || $x < $l2} { ! if {$type != ""} { ! set x $x ! } ! } ! if {$y > $b2 || $y < $t2} { ! if {$type != ""} { ! set y $y } } - set mess2 [lreplace $mess 2 3 $x $y] - if {$in} {pd $mess} else {pd $mess2; if {$type != ""} {incr @obj_count}} } - } } --- 2766,2794 ---- set type [lindex $mess 1] switch $type { ! canvas {set in 1; pd $mess} "" {} connect { mset {from outlet to inlet} [lrange $mess 2 end] set count [llength $@children] set mess2 [list #X connect [expr $from+$count] $outlet [expr $to+$count] $inlet] ! if {$in} {pd $mess} else {pd $mess2; incr @wire_count} } default { if {$type == "restore"} {set in 0} mset {x y} [lmap + [lrange $mess 2 3] $offset] ! set mess2 [lreplace $mess 2 3 $x $y] ! if {$in} { ! pd $mess ! } else { ! if {!$visible} { ! set xoff [expr ($r2 - $l2) * 0.25] ! set yoff [expr ($b2 - $t2) * 0.25] ! set x2 [expr [lindex $mess 2] - [lindex $xcoords $ref] + $l2 + $xoff] ! set y2 [expr [lindex $mess 3] - [lindex $ycoords $ref] + $t2 + $yoff] ! set mess2 [lreplace $mess 2 3 $x2 $y2] } + pd $mess2 + incr @obj_count } } } } *************** *** 3304,3308 **** set @keynav_current $@keynav_last_wire } else { ! if {[llength [$@keynav_current wires]]} { $self deselect_all set @keynav_current [lindex [$@keynav_current wires] 0] --- 3312,3316 ---- set @keynav_current $@keynav_last_wire } else { ! if {[llength [$@keynav_current wires2]]} { $self deselect_all set @keynav_current [lindex [$@keynav_current wires] 0] *************** *** 3804,3808 **** set i 0 if {[info exists fields($@pdclass)]} { ! foreach f $fields($@pdclass) {set _($self:$f) [lindex $mess $i]; incr i} } } --- 3812,3816 ---- set i 0 if {[info exists fields($@pdclass)]} { ! foreach f $fields($@pdclass) {set _($self:$f) [lindex $mess $i];puts " >>> $self:$f <<<"; incr i} } } *************** *** 4356,4361 **** if {[$self selected?]} {set frcol [$self look selectframe]} {set frcol [$self look frame3]} $self item BASE rectangle $xya -fill [$self look bg] -outline $frcol ! $self item BASE1 line $xyb -fill [$self look frame1] ! $self item BASE2 line $xyc -fill [$self look frame2] [$@canvas widget] lower ${self}BASE ${self}TEXT [$@canvas widget] raise ${self}BASE1 ${self}BASE --- 4364,4369 ---- if {[$self selected?]} {set frcol [$self look selectframe]} {set frcol [$self look frame3]} $self item BASE rectangle $xya -fill [$self look bg] -outline $frcol ! #$self item BASE1 line $xyb -fill [$self look frame1] ! #$self item BASE2 line $xyc -fill [$self look frame2] [$@canvas widget] lower ${self}BASE ${self}TEXT [$@canvas widget] raise ${self}BASE1 ${self}BASE
Index: defaults.ddrc =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/defaults.ddrc,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** defaults.ddrc 21 Nov 2006 21:43:43 -0000 1.1.2.9 --- defaults.ddrc 27 Nov 2006 23:10:56 -0000 1.1.2.10 *************** *** 139,142 **** --- 139,143 ---- clear_wires Ctrl+k auto_wire Ctrl+j + subpatcherize Alt+p } Client {