PropertyBag translation cleanup

This commit is contained in:
sliptonic
2022-01-25 17:56:23 -06:00
parent 69e7a2e9fd
commit 23057dc4ba
3 changed files with 23 additions and 22 deletions

View File

@@ -417,12 +417,12 @@ class ObjectOp(object):
self.addOpValues(obj, ["tooldia"])
if FeatureCoolant & features:
oldvalue = str(obj.CoolantMode) if hasattr(obj, "CoolantMode") else "None"
if (
hasattr(obj, "CoolantMode")
and not obj.getTypeIdOfProperty("CoolantMode")
== "App::PropertyEnumeration"
):
oldvalue = str(obj.CoolantMode)
obj.removeProperty("CoolantMode")
if not hasattr(obj, "CoolantMode"):