Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11759
Modified Files: Tag: devel_0_39 desire.tk Log Message: some code for object deletion undo
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.386 retrieving revision 1.1.2.387 diff -C2 -d -r1.1.2.386 -r1.1.2.387 *** desire.tk 20 Aug 2006 21:46:58 -0000 1.1.2.386 --- desire.tk 20 Aug 2006 22:38:55 -0000 1.1.2.387 *************** *** 274,278 ****
# runs the restore procedure for the last item in the root undo queue. ! def* History undo {} { global errorInfo if {![$self can_perform? [lindex $@undo_q end]]} {error "Can't undo this!"} --- 274,278 ----
# runs the restore procedure for the last item in the root undo queue. ! def History undo {} { global errorInfo if {![$self can_perform? [lindex $@undo_q end]]} {error "Can't undo this!"} *************** *** 313,317 **** }
! def* History perform {action} { switch -- [lindex $action 0] { do {eval [lindex $action 1]} --- 313,317 ---- }
! def History perform {action} { switch -- [lindex $action 0] { do {eval [lindex $action 1]} *************** *** 321,325 **** }
! def* History atomically {what code} { global errorInfo set ubackup @undo_q; set @undo_q {} --- 321,325 ---- }
! def History atomically {what code} { global errorInfo set ubackup @undo_q; set @undo_q {} *************** *** 1781,1786 ****
# for undo; calls the server ! def Canvas ins {i constructor} {eval [concat [list pd .$self object_insert $i] $constructor]} ! def Canvas del {i} {pd .$self object_delete ![lindex $@children $i]}
# should be only called from the server --- 1781,1793 ----
# for undo; calls the server ! def Canvas ins {i constructor} { ! eval [concat [list pd .$self object_insert $i] $constructor] ! $@history add [list $self del $i] ! } ! def Canvas del {i} { ! set o [lindex $@children $i] ! $@history add [list $self ins $i [$o deconstruct]] ! pd .$self object_delete !$o ! }
# should be only called from the server *************** *** 1825,1835 **** if {$find != -1} { $self disconnect [lindex $@wires_pair [expr $find - 1]] ! ## remove the selected wire from the @wires_pair... ! set @wires_pair [lreplace $@wires_pair $find $find] ! set @wires_pair [lreplace $@wires_pair [expr $find - 1] [expr $find - 1]] } $wire delete } ! pd .$self object_delete !$obj } foreach x $@selection_wire { --- 1832,1840 ---- if {$find != -1} { $self disconnect [lindex $@wires_pair [expr $find - 1]] ! set @wires_pair [lreplace $@wires_pair [expr $find - 1] $find] } $wire delete } ! $self del [$self index $obj] } foreach x $@selection_wire { *************** *** 4385,4389 **** }
! def Canvas hide_crosshair {} {$self item_delete VHAIR1 HHAIR1}
############ tooltips --- 4390,4394 ---- }
! def Canvas hide_crosshair {} {$self item_delete VHAIR1; $self item_delete HHAIR1}
############ tooltips