Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29528
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixs to auto object chaining
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.510 retrieving revision 1.1.2.511 diff -C2 -d -r1.1.2.510 -r1.1.2.511 *** desire.tk 16 Oct 2006 13:39:07 -0000 1.1.2.510 --- desire.tk 16 Oct 2006 22:11:10 -0000 1.1.2.511 *************** *** 1946,1949 **** --- 1946,1954 ---- foreach o $@selection {$o selected?= 1} } + def Canvas selection2= {idx} { + foreach o $@selection {$o selected?= 0} + set @selection [lindex $@children $idx] + foreach o $@selection {$o selected?= 1} + } def Canvas selection+= {objs} { foreach o $objs {switch $_($o:_class) {Wire {error "selection error"}}} *************** *** 1991,1998 **** super $self draw_io - #set c [$@canvas widget] - #if {$@valid} {set dash {8 8 8 8}} {set dash {}} ;# isn't this backwards? - #$c itemconfigure ${self}BASE -dash $dash - #this is here to allow editing the newly created objectbox if {$@isnew} {$self edit} ;# why this here ? } --- 1996,1999 ---- *************** *** 2022,2026 **** --- 2023,2030 ---- set obj2_idx [$@canvas children_idx $self] $@canvas connect [list $obj1_idx 0 $obj2_idx 0] + $@canvas deselect_all + $@canvas action= none + after 100 $@canvas selection2= $obj2_idx #puts " [lindex [$@canvas children] $obj2_idx]" #$@canvas selection= [lindex [$@canvas children] $obj2_idx] *************** *** 3325,3335 **** def Box connect_in {} {}
! def Box draw {} { ! #if {[$@canvas action] == "chain_obj"} { ! # $@canvas deselect_all ! # $@canvas selection= $self ! #} ! $self draw_box ! } def Box draw_box {} {} def Box edit {} {} --- 3329,3333 ---- def Box connect_in {} {}
! def Box draw {} {$self draw_box} def Box draw_box {} {} def Box edit {} {}