diff options
author | chunlee <chunlee@users.sourceforge.net> | 2008-02-12 17:02:15 +0000 |
---|---|---|
committer | chunlee <chunlee@users.sourceforge.net> | 2008-02-12 17:02:15 +0000 |
commit | e853df6dcb4d38ae4a3b385941a91fb365fa95d1 (patch) | |
tree | 3f83455cf6db258a5b81129c44579541005e6887 | |
parent | 49bb1446e386fe7afa4675ccec6fb81b4d9e33f6 (diff) |
trivil commit testing svn
svn path=/trunk/; revision=9432
-rw-r--r-- | desiredata/src/desire.tk | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/desiredata/src/desire.tk b/desiredata/src/desire.tk index 70f3d052..b6dc28a0 100644 --- a/desiredata/src/desire.tk +++ b/desiredata/src/desire.tk @@ -925,8 +925,9 @@ def Client init_controls {} { . configure -menu .mbar wm title . "DesireData" catch {wm iconphoto . icon_pd} - regexp {\d\d\d\d/\d\d/\d\d} $::cvsid version - regsub -all "/" $version "." version + #regexp {\d\d\d\d/\d\d/\d\d} $::cvsid version + #regsub -all "/" $version "." version + set version "svn" set ::pd_version_client $version post "DesireData client version $version with Tcl %s and Tk %s" $::tcl_patchLevel $::tk_patchLevel } @@ -3272,7 +3273,7 @@ def Canvas target {x y f tag} { if {[$class <= Wire]} {if {$@action != "imove"} {return [list "wire" $id]}} if {[$class <= Box]} { if {$@action == "imove"} { - foreach tag $stack { + foreach tag [$self item_stack $x $y] { set tags2 [$c gettags $tag] if {[regexp {^[xo][0-9a-f]{6,8}} $tags2 id2]} { set class [$id2 class] @@ -3306,7 +3307,7 @@ def Canvas target {x y f tag} { } } -def Canvas identify_closestio {x y f} { +def Canvas item_stack {x y} { set c [$self widget] set cx [expr {$x*$@zoom}] set cy [expr {$y*$@zoom}] @@ -3314,9 +3315,14 @@ def Canvas identify_closestio {x y f} { set stack [$c find overlapping [expr {$cx-$sense}] [expr {$cy-$sense}]\ [expr {$cx+$sense}] [expr {$cy+$sense}]] set stack [lreverse $stack] + return $stack +} + +def Canvas identify_closestio {x y f} { + set c [$self widget] set ios {} set objs {} - foreach tag $stack { + foreach tag [$self item_stack $x $y] { set tags [$c gettags $tag] if {[regexp {^[x][0-9a-f]{6,8}[oi][0-9]{1,3}} $tags io]} { foreach item {i o} { |