gui: Hide wireless links that are not on the current canvas.

This commit is contained in:
tgoff0 2015-01-30 02:46:22 +00:00
parent 69d8ba0002
commit dfdc1fe671

View file

@ -495,7 +495,7 @@ proc drawLink { link } {
# draw a green link between wireless nodes (or other color if multiple WLANs)
# WLAN links appear on the canvas but not in the global link_list
proc drawWlanLink { node1 node2 wlan } {
global zoom defLinkWidth
global zoom defLinkWidth curcanvas
set c .c
set wlanlink [$c find withtag "wlanlink && $node1 && $node2 && $wlan"]
@ -514,7 +514,15 @@ proc drawWlanLink { node1 node2 wlan } {
[expr {$px*$zoom}] [expr {$py*$zoom}] \
-fill $color -width $defLinkWidth \
-tags "wlanlink $node1 $node2 $wlan"]
if { [getNodeCanvas $node1] == $curcanvas &&
[getNodeCanvas $node2] == $curcanvas} {
$c itemconfigure $wlanlink -state normal
$c raise $wlanlink "background || grid || oval || rectangle"
} else {
$c itemconfigure $wlanlink -state hidden
}
return $wlanlink
}