Skip to content

Commit 58cffdf

Browse files
protect
1 parent 9348ea9 commit 58cffdf

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

kratos.gid/scripts/spdAuxiliar.tcl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,18 +393,20 @@ proc spdAux::MergeGroups {result_group_name group_list} {
393393

394394

395395
proc spdAux::GetUsedElements {{alt_un ""}} {
396+
set lista [list ]
396397
set root [customlib::GetBaseRoot]
397398

398399
set un $alt_un
399400
if {$un eq ""} {set un [apps::ExecuteOnCurrentApp write::GetAttribute parts_un]}
400401

401-
set xp1 "[spdAux::getRoute $un]/group"
402-
set lista [list ]
403-
foreach gNode [[customlib::GetBaseRoot] selectNodes $xp1] {
404-
set name [write::getValueByNode [$gNode selectNodes ".//value\[@n='Element']"] ]
405-
if {$name ni $lista} {lappend lista $name}
406-
}
402+
if {$un ne ""} {
407403

404+
set xp1 "[spdAux::getRoute $un]/group"
405+
foreach gNode [[customlib::GetBaseRoot] selectNodes $xp1] {
406+
set name [write::getValueByNode [$gNode selectNodes ".//value\[@n='Element']"] ]
407+
if {$name ni $lista} {lappend lista $name}
408+
}
409+
}
408410
return $lista
409411
}
410412

0 commit comments

Comments
 (0)