From 1cbcc7b5a4df7e86575ddf4896aa2a1cb0f6f6b5 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 20 Jan 2019 19:32:12 -0200 Subject: [PATCH] Arch: Prevision for forward compatibility --- src/Mod/Arch/ArchComponent.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 3fbb224e85..0b5b3393cb 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -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)