gui: Only consider nodes on the same canvas when doing 'Link to all

routers'.
This commit is contained in:
tgoff0 2015-01-30 02:46:14 +00:00
parent 398b8c4345
commit c15d344e1f

View file

@ -142,6 +142,8 @@ proc linkSelectedNodes { wlan nodes } {
proc linkAllNodes { wlan } {
global node_list
set canvas [getNodeCanvas $wlan]
# vars related to the status bar graph
set num 0
set num_nodes [llength $node_list]
@ -157,6 +159,7 @@ proc linkAllNodes { wlan } {
[expr { ($num % $update_interval) }] == 0 } { update }
if { [nodeType $node] != "router" } { continue }
if { [ifcByPeer $wlan $node] != "" } { continue } ;# already linked
if { [getNodeCanvas $node] != $canvas } { continue }; # on a different canvas
newGUILink $wlan $node
}
.c config -cursor left_ptr; update