Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28807
Modified Files: Tag: desiredata desire.tk TODO Log Message: some gop fixes
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.132 retrieving revision 1.1.2.600.2.133 diff -C2 -d -r1.1.2.600.2.132 -r1.1.2.600.2.133 *** desire.tk 21 Dec 2006 15:55:05 -0000 1.1.2.600.2.132 --- desire.tk 21 Dec 2006 20:47:50 -0000 1.1.2.600.2.133 *************** *** 1258,1266 ****
def View draw_maybe {} { - if {$@canvas == "" && [winfo exists .$self.c]} {$self draw; return} if {[$self class] == "Canvas" && $@canvas == ""} {return} if {$@inside_box} { ! if {[$@canvas mapped]} {if {![$@canvas abs]} {$self draw}} } else { # for drawing opened gop --- 1258,1265 ----
def View draw_maybe {} { if {$@canvas == "" && [winfo exists .$self.c]} {$self draw; return} if {[$self class] == "Canvas" && $@canvas == ""} {return} if {$@inside_box} { ! if {[$@canvas mapped] && ![$@canvas abs] && [$self gop_check]} {$self draw} } else { # for drawing opened gop *************** *** 1273,1276 **** --- 1272,1286 ---- } } + #this checks if $self can be seen, ie nested gop. + def View gop_check {} { + set canvases $@canvas + while {[lindex $canvases end] != ""} {lappend canvases [[lindex $canvases end] canvas]} + set canvases [lreplace $canvases end-1 end]; # all canvases + foreach canvas $canvases { + # if a canvas is not a gop and its window does not exists + if {![$canvas gop] && ![winfo exists [$canvas widget]]} {return 0; break} + } + return 1 + }
#-----------------------------------------------------------------------------------# *************** *** 1701,1705 **** --- 1711,1733 ---- def Canvas delete {} { $self delete_window + #if {$@subpatch || $@gop} { + # $self delete_children + #} else { super + #} + } + + def Canvas delete_children {} { + foreach child $@children { + if {[$child class] == "Canvas"} { + $child delete + } else { + $self del [$self index $child] + } + } + foreach wire $@wires { + $self disconnect [$wire connects] + $wire delete + } }
*************** *** 2036,2040 **** if {$@subpatch && $@canvas != "" && !$@gop} {super} ;# is for the [pd] box if applicable if {$@gop} { ! #if {![winfo exists [$self widget]]} {super; return} if {[focus] != [$self widget]} {super;return} } --- 2064,2069 ---- if {$@subpatch && $@canvas != "" && !$@gop} {super} ;# is for the [pd] box if applicable if {$@gop} { ! if {[$self gop_check]} {$self all_changed} ! #if the focus is not in the opened gop if {[focus] != [$self widget]} {super;return} } *************** *** 2442,2446 **** #foreach wire [$o wires] {$@history add [list $o ins $i [$wire deconstruct]]} #foreach obj [$o children] {$@history add [list $o ins $i [$obj deconstruct]]} - #$self delete_children foreach wire [$o wires] { $@history add [list $self ins $i [$wire deconstruct]] --- 2471,2474 ---- *************** *** 4037,4047 **** $self changed_wires #update/move the content of gop ! if {[$self class] == "Canvas"} { ! if {[$self gop] && ![winfo exists .$self.c]} { ! $self all_changed ! } ! } else { ! $self changed_wires ! } }
--- 4065,4075 ---- $self changed_wires #update/move the content of gop ! #if {[$self class] == "Canvas"} { ! # if {[$self gop] && ![winfo exists .$self.c]} { ! #$self all_changed ! # } ! #} else { ! # $self changed_wires ! #} }
Index: TODO =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/TODO,v retrieving revision 1.1.2.28.2.21 retrieving revision 1.1.2.28.2.22 diff -C2 -d -r1.1.2.28.2.21 -r1.1.2.28.2.22 *** TODO 21 Dec 2006 15:55:07 -0000 1.1.2.28.2.21 --- TODO 21 Dec 2006 20:47:52 -0000 1.1.2.28.2.22 *************** *** 8,14 **** [x] fix {;} {$1} in TextBox, loads fine, but there is bug in redraw [ ] fix gop ! [ ] gop content drawn on wrong canvas ! [ ] gop drawing order [x] gop content should not be able to move... [x] futurewire broken [x] drawn from inlet --- 8,15 ---- [x] fix {;} {$1} in TextBox, loads fine, but there is bug in redraw [ ] fix gop ! [x] gop content drawn on wrong canvas [x] gop content should not be able to move... + [x] gop content should not be able to make wire + [ ] rightclick open don't work on nested gop [x] futurewire broken [x] drawn from inlet *************** *** 19,22 **** --- 20,24 ---- [x] partically fixed (def Canvas del) [ ] server sends -> x806a3b8 delete twice + [ ] closing opened [pd] window broken ---------------------------------------------------------------- 0.40.pre7-...