[PD-cvs] pd/src desire.tk,1.1.2.600.2.351,1.1.2.600.2.352
chunlee
chunlee at users.sourceforge.net
Sun Aug 12 18:31:53 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32405
Modified Files:
Tag: desiredata
desire.tk
Log Message:
add @edit_obj in Canvas to store object current being edited
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.351
retrieving revision 1.1.2.600.2.352
diff -C2 -d -r1.1.2.600.2.351 -r1.1.2.600.2.352
*** desire.tk 12 Aug 2007 08:13:23 -0000 1.1.2.600.2.351
--- desire.tk 12 Aug 2007 16:31:49 -0000 1.1.2.600.2.352
***************
*** 1662,1665 ****
--- 1662,1669 ----
def Canvas editmodeswitch {args} {$self editmode= [expr !$@editmode]}
+
+ def Canvas edit_obj {} {return $@edit_obj}
+ def Canvas edit_obj= {val} {set @edit_obj $val}
+
def Canvas window {} {
#if {$@gop && $@canvas != ""} {return [$@canvas window]}
***************
*** 1723,1726 ****
--- 1727,1731 ----
set @macro_q {}
set @macro_delay 200
+ set @edit_obj ""
}
***************
*** 2530,2534 ****
}
def TextBox edit {} {
! if {$@edit} {return}; set @edit 1; $self changed edit
if {[[$self class] <= AtomBox]} {set @clear 1}
}
--- 2535,2539 ----
}
def TextBox edit {} {
! if {$@edit} {return}; set @edit 1;$@canvas edit_obj= $self; $self changed edit
if {[[$self class] <= AtomBox]} {set @clear 1}
}
***************
*** 2766,2770 ****
def TextBox unedit {{accept 1}} {
if {!$@edit} {return}
! set @edit 0; $self changed edit
set c [[$self get_canvas] widget]
set t $c.${self}text
--- 2771,2776 ----
def TextBox unedit {{accept 1}} {
if {!$@edit} {return}
! set @edit 0; $@canvas edit_obj= ""
! $self changed edit
set c [[$self get_canvas] widget]
set t $c.${self}text
***************
*** 4295,4298 ****
--- 4301,4306 ----
} else {set obj $id}
if {[$id class] == "Canvas"} {if {[$id text] == "graph"} {set @action none; return}}
+ set obj_in_edit [$self edit_obj]
+ if {$obj_in_edit != ""} {$obj_in_edit unedit}
$obj edit; set @action none; $obj changed action
}
More information about the Pd-cvs
mailing list