Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2563
Modified Files: Tag: desiredata desire.tk Log Message: small fix on tab selection and delete
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.229 retrieving revision 1.1.2.600.2.230 diff -C2 -d -r1.1.2.600.2.229 -r1.1.2.600.2.230 *** desire.tk 13 Jul 2007 11:06:21 -0000 1.1.2.600.2.229 --- desire.tk 13 Jul 2007 22:32:10 -0000 1.1.2.600.2.230 *************** *** 2420,2426 **** }
- def Canvas wire_id {wire} { - set idx [lsearch $@wires_pare $wire] - } def ObjectBox draw_box {} { super --- 2420,2423 ---- *************** *** 2574,2577 **** --- 2571,2578 ---- def Canvas del {i} { set o [lindex $@children $i] + if {$o == $@keynav_current || $o == $@keynav_last_obj} { + set @keynav_current 0 + set @keynav_last_obj 0 + } if {[$o class] != "Canvas"} { $@history add [list $self ins $i [$o deconstruct]] *************** *** 2607,2610 **** --- 2608,2620 ---- def Canvas delete_selection {} { if {![llength $@selection] && ![llength $@selection_wire]} {return} + if {$@keynav} { + set @keynav 0 + switch [$@keynav_current class] { + Wire {set @keynav_last_wire 0} + default {set @keynav_last_obj 0} + } + set @keynav_current 0 + $@active hide + } set del_wire {} foreach obj $@selection { *************** *** 2627,2631 **** if {$find != -1 && $find2 < 0} { $self disconnect [$x connects] - #$x delete } } --- 2637,2640 ---- *************** *** 2633,2645 **** set @selection {} set @selection_wire {} ! if {$@keynav} { ! set @keynav 0 ! switch [$@keynav_current class] { ! Wire {set @keynav_last_wire 0} ! default {set @keynav_last_obj 0} ! } ! set @keynav_current 0 ! $@active hide ! } }
--- 2642,2646 ---- set @selection {} set @selection_wire {} ! }
*************** *** 3529,3532 **** --- 3530,3538 ---- def Canvas disconnect {wire} { set @keynav_tab_sel "wire" + set id [lindex $@wires [$self wire_idx $wire]] + if {$id == $@keynav_current || $id == $@keynav_last_wire} { + set @keynav_current 0 + set @keynav_last_wire 0 + } mset {from outlet to inlet} $wire netsend [list .$self disconnect $from $outlet $to $inlet]