BIM: Fixed windows autohosting - fixes #14197
This commit is contained in:
committed by
Yorik van Havre
parent
1da8e17ffa
commit
d119dc574b
@@ -61,7 +61,6 @@ __url__ = "https://www.freecad.org"
|
||||
|
||||
# presets
|
||||
WindowPartTypes = ["Frame","Solid panel","Glass panel","Louvre"]
|
||||
AllowedHosts = ["Wall","Structure","Roof"]
|
||||
WindowOpeningModes = ["None","Arc 90","Arc 90 inv","Arc 45","Arc 45 inv","Arc 180",
|
||||
"Arc 180 inv","Triangle","Triangle inv","Sliding","Sliding inv"]
|
||||
WindowPresets = ArchWindowPresets.WindowPresets
|
||||
|
||||
@@ -30,6 +30,7 @@ import FreeCADGui
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
ALLOWEDHOSTS = ["Wall","Structure","Roof"]
|
||||
|
||||
|
||||
class Arch_Window:
|
||||
@@ -214,7 +215,7 @@ class Arch_Window:
|
||||
host = self.baseFace[0]
|
||||
elif obj:
|
||||
host = obj
|
||||
if Draft.getType(host) in AllowedHosts:
|
||||
if Draft.getType(host) in ALLOWEDHOSTS:
|
||||
FreeCADGui.doCommand("win.Hosts = [FreeCAD.ActiveDocument." + host.Name + "]")
|
||||
siblings = host.Proxy.getSiblings(host)
|
||||
for sibling in siblings:
|
||||
|
||||
Reference in New Issue
Block a user