Skip to content

Commit

Permalink
Arch: Fixed window bug - fixes 2449
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Feb 12, 2016
1 parent 6a35ef3 commit a649c3c
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/Mod/Arch/ArchWindow.py
Expand Up @@ -636,25 +636,26 @@ def __init__(self,obj):

def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop in ["Base","WindowParts"]:
self.execute(obj)
elif prop in ["HoleDepth"]:
for o in obj.InList:
if Draft.getType(o) in AllowedHosts:
o.Proxy.execute(o)
elif prop in ["Width","Height"]:
if obj.Preset != 0:
if obj.Base:
try:
if prop == "Height":
obj.Base.setDatum(16,obj.Height.Value)
elif prop == "Width":
obj.Base.setDatum(17,obj.Width.Value)
except:
# restoring constraints when loading a file fails
# because of load order, but it doesn't harm...
pass
FreeCAD.ActiveDocument.recompute()
if not "Restore" in obj.State:
if prop in ["Base","WindowParts"]:
self.execute(obj)
elif prop in ["HoleDepth"]:
for o in obj.InList:
if Draft.getType(o) in AllowedHosts:
o.Proxy.execute(o)
if prop in ["Width","Height"]:
if obj.Preset != 0:
if obj.Base:
try:
if prop == "Height":
obj.Base.setDatum(16,obj.Height.Value)
elif prop == "Width":
obj.Base.setDatum(17,obj.Width.Value)
except:
# restoring constraints when loading a file fails
# because of load order, but it doesn't harm...
pass
FreeCAD.ActiveDocument.recompute()


def execute(self,obj):
Expand Down

0 comments on commit a649c3c

Please sign in to comment.