Arch: Prevision for forward compatibility
This commit is contained in:
@@ -255,6 +255,12 @@ class Component:
|
||||
if r in IfcRoles:
|
||||
obj.IfcRole = r
|
||||
FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" Role property to IfcRole\n")
|
||||
if "IfcType" in pl: # for future backwards compatibility
|
||||
r = obj.IfcType
|
||||
obj.removeProperty("IfcType")
|
||||
if r in IfcRoles:
|
||||
obj.IfcRole = r
|
||||
FreeCAD.Console.PrintMessage("Downgrading "+obj.Label+" IfcType property to IfcRole\n")
|
||||
if not "MoveWithHost" in pl:
|
||||
obj.addProperty("App::PropertyBool","MoveWithHost","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if this object must move together when its host is moved"))
|
||||
obj.MoveWithHost = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetBool("MoveWithHost",False)
|
||||
|
||||
Reference in New Issue
Block a user