TopoSeries: fix duplicate link detection

This commit is contained in:
DeepSOIC 2017-01-16 18:13:16 +03:00
parent 5187d427bf
commit 260f6c257a

View File

@ -45,7 +45,7 @@ def findAllLinksTo(doc_obj):
expression links.""" expression links."""
ret = [] ret = []
doc = doc_obj.Document doc = doc_obj.Document
for obj in doc_obj.InList: for obj in set(doc_obj.InList): # InList sometimes reports same object multiple times. Wrapping with set() removes the duplicates.
for prop_name in obj.PropertiesList: for prop_name in obj.PropertiesList:
typ = obj.getTypeIdOfProperty(prop_name) typ = obj.getTypeIdOfProperty(prop_name)
if typ == 'App::PropertyLink': if typ == 'App::PropertyLink':