Skip to content

Commit aa0f3f3

Browse files
committed
Clear extra tags when restoring collection
When restoring a collection, unset the extra tags on loaded modules that are not defined in collection.
1 parent f4ce1ac commit aa0f3f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tcl/subcmd.tcl.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,17 @@ proc cmdModuleRestore {{coll default}} {
652652
set curr_mod_list [getLoadedModuleList]
653653
set curr_nuasked_list [getTaggedLoadedModuleList auto-loaded]
654654

655+
# update tags sets on the modules already loaded at correct position
656+
# remove extra tags that are not defined in collection
657+
foreach modvr [getLoadedModuleWithVariantList] {
658+
if {[info exists coll_tag_arr($modvr)]} {
659+
set tag_list $coll_tag_arr($modvr)
660+
} else {
661+
set tag_list {}
662+
}
663+
cmdModuleTag 1 $tag_list $modvr
664+
}
665+
655666
# determine what module to load to restore collection from current
656667
# situation with preservation of the load order
657668
# list of alternative and simplified names for loaded modules has been

0 commit comments

Comments
 (0)