Skip to content

Commit

Permalink
[ArchComponent] Fix Link Of Window Hosts if empty got error as Wall C…
Browse files Browse the repository at this point in the history
…hild
  • Loading branch information
paul lee committed Jan 17, 2021
1 parent 625502b commit ed15b99
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Mod/Arch/ArchComponent.py
Expand Up @@ -757,8 +757,8 @@ def processSubShapes(self,obj,base,placement=None):
subs = obj.Subtractions
for link in obj.InListRecursive:
if hasattr(link,"Hosts"):
for host in link.Hosts:
if host == obj:
if link.Hosts:
if obj in link.Hosts:
subs.append(link)
elif hasattr(link,"Host") and Draft.getType(link) != "Rebar":
if link.Host == obj:
Expand Down Expand Up @@ -1120,14 +1120,15 @@ def getHosts(self,obj):
"""

hosts = []

for link in obj.InListRecursive:
if hasattr(link,"Host"):
if link.Host:
if link.Host == obj:
hosts.append(link)
elif hasattr(link,"Hosts"):
for host in link.Hosts:
if host == obj:
if link.Hosts:
if obj in link.Hosts:
hosts.append(link)
return hosts

Expand Down

0 comments on commit ed15b99

Please sign in to comment.